bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Terminating background bash kills the parent?


From: Bize Ma
Subject: Terminating background bash kills the parent?
Date: Thu, 20 Dec 2018 00:02:06 -0500

Open a new terminal like xterm, change prompt to something like:

    PS1=' $SHLVL $ '

Start a couple of bash subshells:

    1 $ bash
    2 $ bash
    3 $ echo $$
    9371

Suspend the last one:

    3 $ suspend
    [1]+ Stopped                 bash
    2 $ echo $$
    9313
    2 $

Make the suspended shell continue:

    2 $ kill -CONT 9371

The parent gets killed

    1 $ echo $$
    9034
     1 $

Take a look at:
https://unix.stackexchange.com/questions/379507/weird-terminating-background-bash-kills-the-parent


reply via email to

[Prev in Thread] Current Thread [Next in Thread]