forked from deadpixi/sam
-
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.
Don't remove socket when exiting forked process
Previously, using any command that forked sam would run the odd risk of causing sam's control socket to exit. This seems to be a consequence of using atexit() to schedule removal of the control socket from the file system. This commit adds a global boolean named forked, which is set to true in child process after they are forked. The exit handlers removesocket() and rmsocket() are changed such that they don't remove the control sockets if the forked boolean is set to true. Sam's control socket should only get removed once the main instance exits. Fixes deadpixi#75
- Loading branch information
Showing
4 changed files
with
9 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