Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Mar 2001 06:37:07 -0800 (PST)
From:      Barak Enat <barak_enat@yahoo.com>
To:        freebsd-questions@freebsd.org
Subject:   /bin/sh as a login shell does not handle SIGHUP correctly?
Message-ID:  <20010312143707.7359.qmail@web1304.mail.yahoo.com>

next in thread | raw e-mail | index | archive | help
Hi,

I'm using /bin/sh as a login shell, but I see a weired
problem. When a blocking process (such as an endless
loop) is running as a foreground process and the
terminal is closed (e.g. closing the xterm window or
disconnecting the telnet or rlogin sessions), both the
blocking process and the parent shell are not
terminated.

According to my investigation, the reason is that the
blocking process is not receiving the SIGHUP signal,
and even if it does receive it, it is ignored. From
that I assume that the shell is started by telnetd to
ignore a SIGHUP, and that the shell does not overide
this. As far as I know it is the session's leader
responsibility to catch the HUP event and send it to
the foregrond process group.

If I use tcsh I get the expected behaviour and any
foreground process is terminated when the session is
closed.

Have I missed something?

Thanks,
Barak


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010312143707.7359.qmail>