Subject: tip/SIGTERM/signals bug?
To: None <netbsd-bugs@sun-lamp.cs.berkeley.edu>
From: Brad Parker <brad@fcr.com>
List: netbsd-bugs
Date: 11/11/1993 18:10:52
I'm running netbsd-current and I wonder if anyone can explain this
(I also wonder if anyone reads what I send to this list ;-)

If I rlogin to netbsd, run tip and then exit the rlogin (by typing
"~." instead of "~~.", oops), neither side of the tip dies (the input
nor the output side).  Instead, the input side constantly reads -1
from getchar and sends this to the modem.

If I change tip to notice the -1 return from getchar and call cleanup(),
it exits cleanly.

Now, I could change tip, but I would guess that tip is not actually
the problem.  I would also guess that when I break the rlogin session
all the procs get at least a SIGHUP.  the tip code appears to catch
sigterm and call cleanup.  but, for some reason this is not happening.

it seems odd to me that this is happening but I'm not quite sure how
to debug it...

any suggestions?

(it appears the pty code will send a SIGHUP to the session leader; I'm
assuming this will be the login shell.  since the tip was not run
in backgroup, it will be be in the same process group as the login
shell, right?  should the psignal() in ttymodem be a pgsignal to the
process group?)

-brad



------------------------------------------------------------------------------