Red Hat Bugzilla – Bug 811046
mc kill bash before this is able save it's history file
Last modified: 2013-07-02 19:55:17 EDT
Description of problem:
In some cases systemd perhaps kill bash process, so that isn't able save it's history file. This may occur randomly perhaps when machine is rebooted too (but i'm not able simulate it now, it's only speculation).
But below described sequence give me 100% results.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. from console shell run mc (Midnight Commander)
2. with CTRL/O hide mc panels and in subshell type several commands
3. then retrieve mc panels pressing CTRL/O again, and with F10 leave mc
4. history file (~/.bash_history) should contain entered commands appended, but these not there.
what is slightly interesting, when before point 3) above I tell systemd do debugging (by "/bin/kill -s SIGRTMIN+22 1" command), then bash suffice to save its history. In /var/log/messages however are no systemd messages (with the exception of "systemd: Setting log level to debug." line).
And when I then will send "/bin/kill -s SIGRTMIN+23 1" command), and then repeate steps 1-4 above, then in messages is only "systemd: Setting log level to info." line, and in history file are omitted subshell commands.
systemd is not involved with subshells executed by mc.
(In reply to comment #1)
> systemd is not involved with subshells executed by mc.
Are You sure? When mc (subshell's parent process) exited, then subshell's parent will be systemd (PPID==1), OK? Isn't then possible, that systemd kill him without subshell is able save it's history?
And what about above described findings, where in systemd normal state is history in all tests lost, and with systemd in debugging mode is history in all tests fine?
Several minutes ago I was filled Bug 821254 (https://bugzilla.redhat.com/show_bug.cgi?id=821254), which is almost equivalent of this bug - only shell isn't started from MC, but "screen" process. All other symptoms are same, thus it seems for ma as it isn't MC problem, and bug should be assigned back to systemd.
*** This bug has been marked as a duplicate of bug 821254 ***