I apologize if the answer is really simple.  Logged into a Linux server, I was practicing different job control builtins and I arrived at the suspend command.  Being curious, I did the first thing anyone would do: type suspend and see what happens.user@server:~$ suspend-bash: suspend: cannot suspend a login shellSo then I created a subshell, and tried to suspend it:user@server:~$ bashuser@server:~$ suspend[1]+ Stopped   bashuser@server:~$ This was fine.  Or so I thought!  Being satisfied that the suspend command worked, I decided to end that subshell:user@server:~$ kill %1[1]+ Stopped   bashuser@server:~$ user@server:~$Strange, I thought.  Ignoring the fact that I failed to actually terminate that subshell, I got two prompts on that line.  So I hit enter to get a tidier prompt, and:user@server:~$ user@server:~$ logoutuser@server:~$ Connection to server closed.user@client:~$This comes as a surprise.  It also works with a local terminal, it does not require being connected to a remote server.  A local terminal will go back to the login prompt.  A terminal in a desktop session will close.So how does trying to kill a backgrounded subshell result in the parent dying?
Weird: terminating background bash kills the parent?
bash