Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14933

Terminating background bash kills the parent?

From Bize Ma <binaryzebra@gmail.com>
Newsgroups gnu.bash.bug
Subject Terminating background bash kills the parent?
Date 2018-12-20 00:02 -0500
Message-ID <mailman.5987.1545282143.1284.bug-bash@gnu.org> (permalink)

Show all headers | View raw


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

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Terminating background bash kills the parent? Bize Ma <binaryzebra@gmail.com> - 2018-12-20 00:02 -0500

csiph-web