Signals to handle
- SIGINT
cntrl +c , handle signal to shutdown gracefully and do any necessary clean up
- SIGTERM
unlikey to be needed as this would require a kill pid command, however it will be worth exploring to see if it would be safer to handle it any way
- SIGHUP
This is sent when a terminal session is disconnected , often affecting demonized processes ( since we are not allowed to fork it will not be deamonized)
manual triggering is possible.
only really required if we use config files, this will allow a graceful reloading of the config files incase of SIGHUP
There may be a case where if we need server to restart that this is handled to reinitialize a global state as this can affect epoll()
- SIGPIPE
prevent crashes by handling broken pipes, such as sending data to a client that is no longer available (closed socket)
"MSG_NOSIGNAL in send() (Linux)." ?
- SIGSTP
cntrl +z , this will pause the server , we may need to consider if pausing will cause problems with things like timeouts
- SIGQUIT
cntrl +\ this causes a core dump and could be useful to handle for debugging, maybe by making sure the latest log is in a log.log file?
- SIGUSER!/SIGUSER2
these can be used for custom actions , but this may be out of scope for our project
REMEMBER TO ADD TO READ ME
https://www.computerhope.com/unix/signals.htm
more indepth
https://www.man7.org/linux/man-pages/man7/signal.7.html
Signals to handle
cntrl +c , handle signal to shutdown gracefully and do any necessary clean up
unlikey to be needed as this would require a kill pid command, however it will be worth exploring to see if it would be safer to handle it any way
This is sent when a terminal session is disconnected , often affecting demonized processes ( since we are not allowed to fork it will not be deamonized)
manual triggering is possible.
only really required if we use config files, this will allow a graceful reloading of the config files incase of SIGHUP
There may be a case where if we need server to restart that this is handled to reinitialize a global state as this can affect epoll()
prevent crashes by handling broken pipes, such as sending data to a client that is no longer available (closed socket)
"MSG_NOSIGNAL in send() (Linux)." ?
cntrl +z , this will pause the server , we may need to consider if pausing will cause problems with things like timeouts
cntrl +\ this causes a core dump and could be useful to handle for debugging, maybe by making sure the latest log is in a log.log file?
these can be used for custom actions , but this may be out of scope for our project
REMEMBER TO ADD TO READ ME
https://www.computerhope.com/unix/signals.htm
more indepth
https://www.man7.org/linux/man-pages/man7/signal.7.html