Skip to content

improve the Wait for Package locks#158

Open
FrankiePustorino wants to merge 1 commit into
Utappia:developfrom
FrankiePustorino:patch-7
Open

improve the Wait for Package locks#158
FrankiePustorino wants to merge 1 commit into
Utappia:developfrom
FrankiePustorino:patch-7

Conversation

@FrankiePustorino
Copy link
Copy Markdown
Contributor

Looking at the WAIT_FOR_PACKAGE_LOCKS function, the hang is caused by sudo lsof — it can block indefinitely if a lock file is held by a process that itself is waiting. Also, piping through sudo tee adds another potential stall point. The fix is to:

Replace lsof with fuser (faster, purpose-built for file-use checks) with a timeout
Remove the tee pipe that's unnecessary for the logic
Add a hard timeout wrapper so the check can never hang indefinitely

Here's the fixed WAIT_FOR_PACKAGE_LOCKS function

Commit based on my comment under issue for Internet connecttion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant