Closed droe closed 4 years ago
If I kill sslsplit with SIGINT or SIGTERM signals, it exits with status 1 (e.g. echo $?). But the second bullet claims that 0 should be returned. Is this expected? I guess I am missing something.
You're not missing anything, I broke my change during refactoring. Fixed.
Appendix E. Exit Codes With Special Meanings reads "Control-C is fatal error signal 2", so I guess they expect us to return 130 upon SIGINT. But I like it this way. As you wish.
Thank you, Soner!
This pull request is meant to address #252 in the following ways:
Signals that are non-fatal, such as SIGUSR1, will not lead to a shutdown. Some signals not handled by sslsplit, such as SIGKILL or SIGSEGV, will lead to a termination by the kernel, meaning that the process interested in the exit status will use wait(2) to acquire the signal. In the special case of sslsplit running directly from a shell, most shells will translate the signal number to an exit status using the same scheme of 128 + signal number.
All of this is only relevant when not running sslsplit as a daemon.