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


Groups > gnu.bash.bug > #14933 > unrolled thread

Terminating background bash kills the parent?

Started byBize Ma <binaryzebra@gmail.com>
First post2018-12-20 00:02 -0500
Last post2018-12-20 00:02 -0500
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug


Contents

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

#14933 — Terminating background bash kills the parent?

FromBize Ma <binaryzebra@gmail.com>
Date2018-12-20 00:02 -0500
SubjectTerminating background bash kills the parent?
Message-ID<mailman.5987.1545282143.1284.bug-bash@gnu.org>
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

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web