Bug 811046 - mc kill bash before this is able save it's history file
Summary: mc kill bash before this is able save it's history file
Keywords:
Status: CLOSED DUPLICATE of bug 821254
Alias: None
Product: Fedora
Classification: Fedora
Component: mc
Version: 16
Hardware: i686
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Jindrich Novy
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-10 00:31 UTC by Frantisek Hanzlik
Modified: 2013-07-02 23:55 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-09-11 16:20:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Frantisek Hanzlik 2012-04-10 00:31:25 UTC
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):
systemd-37-17.fc16.i686
bash-4.2.24-1.fc16.i686
mc-4.8.1-2.fc16.i686
kernel-PAE-3.3.1-3.fc16.i686

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 13:24:09 UTC
systemd is not involved with subshells executed by mc.

Comment 2 Frantisek Hanzlik 2012-05-13 13:21:47 UTC
(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 15:38:50 UTC
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 16:20:41 UTC

*** 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.