forked from vasi/squashfuse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a notification mechanism for signaling when the mountpoint is ready
Add the notify_pipe option which allows the user to specify the path to a named pipe. When the mountpoint is ready, a message will be written to this pipe: 's' for success and 'f' for failure. To avoid blocking the fuse process until the pipe is read, a new process is spawned which performs a blocking operation on the pipe. In case of mount failure, no additional process is created and the main process blocks until the pipe is read. An example of operation is provided below: ``` set -x FIFO=$(mktemp -u) mkfifo "$FIFO" ./squashfuse_ll -o notify_pipe="$FIFO" -f /path/to/squashfs/archive /tmp/squash& STATUS=$(head -c1 "$FIFO") if [ "$STATUS" = "s" ]; then echo "Mountpoint contains:" ls /tmp/squash else echo "Mounting squashfuse on /tmp/squash failed" fi ``` Fixes vasi#49
- Loading branch information
1 parent
21ab372
commit 4ee02c9
Showing
7 changed files
with
95 additions
and
1 deletion.
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
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
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