-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bbs.c: Fix restarts failing due to SIGHUP.
Use SIG_IGN as the signal handler for SIGHUP. Previously, a custom handler (that did nothing) was used, which would cause restarts to fail randomly, because because custom handlers are not preserved by execve. SIG_IGN does not have this problem, since SIG_IGN is preserved by execve, so by using it, we ensure that SIGHUP can't be received during a restart and cause the BBS to exit. Additionally, switch all signal handler setup to use sigaction(2), rather than the obsolete signal(2), since there was no good reason we were using it in the first place.
- Loading branch information
1 parent
17e6d6f
commit ea38bdc
Showing
1 changed file
with
57 additions
and
27 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