-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
util: Move program locking out of dispatch_commands()
The dispatch_commands() helper takes a program lock and holds it while the command is being executed. This was added for the use of xdp_filter, and is really only needed for that; none of the other utilities really need locking to synchronise with itself (and libxdp has its own locking for the dispatcher). Move the locking out of dispatch_commands() and instead add explicit lock and unlock calls to each of the xdp-filter commands. While doing so, also move the locking to use the same directory-fd based approach as the libxdp locking uses. This has the benefit of not writing any lock files, so the lock is automatically cleared when the application exits, even if it crashes. This should fix any issues with stale lock files sticking around, which we did not have any good way to clean up. Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
- Loading branch information
Showing
4 changed files
with
80 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.