john smith
2018-04-06 13:11:24 UTC
Hello,
I'm using bash 4.4.18 with busybox. When reboot is done SIGTERM is
sent to all processes by busybox init. The problem is that while
SIGTERM is always handled by sigterm_sighandler() in bash at reboot
it's not always handled by rl_getc(). I did 10 attempts and SIGTERM
has been not handled by rl_getc() in 8 cases. It's problematic
because rl_get() returns EOF on SIGTERM and it makes bash perform
logout and save history.
When I start a new session via telnet and kill a previously started
bash session opened on serial console I can see that SIGTERM is
handled in rl_getc() every time.
What can be the reson rl_getc() does not handle SIGTERM on reboot?
I'm using bash 4.4.18 with busybox. When reboot is done SIGTERM is
sent to all processes by busybox init. The problem is that while
SIGTERM is always handled by sigterm_sighandler() in bash at reboot
it's not always handled by rl_getc(). I did 10 attempts and SIGTERM
has been not handled by rl_getc() in 8 cases. It's problematic
because rl_get() returns EOF on SIGTERM and it makes bash perform
logout and save history.
When I start a new session via telnet and kill a previously started
bash session opened on serial console I can see that SIGTERM is
handled in rl_getc() every time.
What can be the reson rl_getc() does not handle SIGTERM on reboot?
--
<***@gmail.com>
<***@gmail.com>