On Sat, Mar 19, 2005 at 06:55:41PM +0200, shimi wrote: > > --=-XxNlsoOqaHWSV1EEauEW > Content-Type: text/plain > Content-Transfer-Encoding: 7bit > > On Sat, 2005-03-19 at 11:25 +0200, Oron Peled wrote: > > > On Friday 18 March 2005 12:00, shimi wrote: > > > Well, I see it that way: > > > > > > If you kill a process, all the processes that were spawned by it are > > > being killed as well [or supposed to be]. > > > > What you just described may exist in some other operating > > system, but is definitely not Unix/Linux/Posix behavior. > > > Funny, I could *swear* it happend to me in the past (like 7 years ago). > (happend to me when I killed bash on a different connection, and my > session died, although I was *in* a program). But I did work on many > different systems back then, so, who knows :) Thanks for the heads up :)
When you destroy a terminal, every process that uses it should get SIGHUP (Hangup) on a POSIX system. This is something that should happen. There is a notion of a session and process groups. > > Still, why isn't that a good idea? You're leaving the program that sshd > spawned (and it knows what it spawned, right?), which means you > obviously want to stop ssh doing "his thing" for which you negotiated in > the first place... I cannot see a reason to leave a stale session, which > you really can't do anything with (like running 'fg' to take the process > back to your control and communicate with it) ? If you kill the sshd itself you destroy the tty device. If you only kill the shell it has spawned, that shell should handle killing its children as it sees fit. I'm too lazy to check how a bash login shell handles this and how a POSIX login shell should. As for other ssh connections not via this shell (e.g: X forwarding): This is an issue for the user and the ssh client to resolve. Anyway, as any decent ssh client leaves you the option of listing the connections and terminating the whole session, you can probably live with that. -- Tzafrir Cohen | New signature for new address and | VIM is http://tzafrir.org.il | new homepage | a Mutt's [EMAIL PROTECTED] | | best ICQ# 16849755 | Space reserved for other protocols | friend ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]