Announcement

Collapse
No announcement yet.

konsole killing child processes on exit, and midnight commander...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    konsole killing child processes on exit, and midnight commander...

    Scenario 1:

    I am in a konsole bash session. I run this command:

    konsole
    ...and then in that window I run midnight commander with

    mc
    ...then open an mp3 file in vlc, and then go back to the mc window and hit control-c, midnight commander exits, and then I "exit" the konsole window and the vlc process continues to run, as desired.


    Scenario 2:

    I am in a konsole bash sesion and enter:

    konsole -e mc
    ...and then use mc to open an mp3 file with vlc. Then when I ctrl-c in midnight commander, both the konsole window and vlc die.


    Why is running the command in konsole with -e causing its child processes to die when it dies, but opening it without -e and running a child process does not cause this? I notice that in scenario 1, if instead of typing "exit" I instead alt-f4 and kill the window, then it does kill vlc, just like in scenario 2. From this I deduce that when you ctrl-c a process in a "konsole -e" session, it sends SIGHUP or SIGKILL or whatever to all child processes.

    The reason I'm struggling with this is that I want to call up mc with a keyboard shortcut, be able to spawn child processes (like vlc playing a file) and the ctrl-c the mc window and have the vlc survive, but I can't figure out how to make it work.

    Any idea of how I can tell konsole that the -e process should live on as a background process? Or any other way around this? I tried going into the menu of mc and doing exit that way (rather than ctrl-c) but it had the same result.
Working...
X