Currently, airupd will terminate if signals like SIGSEGV or SIGABRT are sent to the daemon, which usually causes a kernel panic. We should register signal handlers for them to avoid terminations. The signal handlers are simple enough, so they don't lead to UBs.
The signal handler should first try to execve:
airup debug --daemon-crash-handler
If the operation failed, try to execve on /bin/sh.
If all the above operations failed, do infinity spin loops.
This introduces a new airup debug utility, --daemon-crash-handler. This should also keep simple. The crash handler should:
Currently,
airupd
will terminate if signals likeSIGSEGV
orSIGABRT
are sent to the daemon, which usually causes a kernel panic. We should register signal handlers for them to avoid terminations. The signal handlers are simple enough, so they don't lead to UBs.The signal handler should first try to
execve
:If the operation failed, try to
execve
on/bin/sh
.If all the above operations failed, do infinity spin loops.
This introduces a new
airup
debug utility,--daemon-crash-handler
. This should also keep simple. The crash handler should: