Re: Lots of bash processes

Daniel Beer <[email protected]>
Newsgroups gmane.org.user-groups.linux.dunedin.general
Message-ID <[email protected]>
On Tue, Apr 29, 2014 at 01:51:49PM +1200, Worik Stanton wrote:
> I have a VPS at Digital Ocean I use for various little fun things.
> 
> But I have a problem:  I am seeing 'bash' processes multiply like
> rabbits.  No bash process I start ever stops unless I specifically exit.
>  I would have expected a bash process to die when the attached terminal
> goes away, by default.  But clearly not.
> 
> Is there a way I can change bash's default behaviour so that it dies
> with the terminal it is attached to?

This is the default behaviour -- the loss of a terminal causes SIGHUP to
be delivered to all attached processes, and bash's default response to
SIGHUP is to exit.

Are these processes lying around from old SSH sessions which have gone
dead? If that's the case, you should set TCP keep-alive on the VPS to
periodically poke old TCP connections.

Cheers,
Daniel

-- 
Daniel Beer <[email protected]>    www.dlbeer.co.nz
IRC: inittab (Freenode)    PGP key: 2048D/160A553B

_______________________________________________
DunLUG mailing list
[email protected]
http://lists.ethernal.org/listinfo/dunlug
DunLUG Wiki - http://dunlug.kallisti.net.nz/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.