Bug 811046 - mc kill bash before this is able save it's history file
mc kill bash before this is able save it's history file
Status: CLOSED DUPLICATE of bug 821254
Product: Fedora
Classification: Fedora
Component: mc (Show other bugs)
i686 Linux
unspecified Severity high
: ---
: ---
Assigned To: Jindrich Novy
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-04-09 20:31 EDT by Frantisek Hanzlik
Modified: 2013-07-02 19:55 EDT (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-09-11 12:20:41 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Frantisek Hanzlik 2012-04-09 20:31:25 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.
Additional info:
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[1]: 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[1]: Setting log level to info." line, and in history file are omitted subshell commands.
Comment 1 Lennart Poettering 2012-04-11 09:24:09 EDT
systemd is not involved with subshells executed by mc.
Comment 2 Frantisek Hanzlik 2012-05-13 09:21:47 EDT
(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?
Comment 3 Frantisek Hanzlik 2012-05-13 11:38:50 EDT
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.
Comment 4 Jindrich Novy 2012-09-11 12:20:41 EDT

*** This bug has been marked as a duplicate of bug 821254 ***

Note You need to log in before you can comment on or make changes to this bug.