Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Aug 1999 02:18:33 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        nick.hibma@jrc.it
Cc:        barrett@phoenix.aye.net, fjoe@iclub.nsu.ru, hackers@FreeBSD.ORG
Subject:   Re: dropped connections (fwd)
Message-ID:  <199908270218.TAA23170@usr06.primenet.com>
In-Reply-To: <Pine.GS4.4.10.9908261634390.2780-100000@elect8> from "Nick Hibma" at Aug 26, 99 04:36:06 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> ee does the same. The reason is that the program does not check for EOF
> on stdin, it continuously loops. It's a bug in the program. The thing
> that could have been changed is a signal from the shell that is no
> longer sent or so.
> 
> The problem is the program, not the OS.
> 
> It might be wortwhile to find the problem, solve and send the patch to
> the maintainer of the port and the original author.

Unless the program is blocking SIGHUP, it is arguable that this
is a misinterpretation of POSIX requirements for delivery of
signals to process groups when controlling tty's are revoked
by FreeBSD.

I believe that it is a misinterpretation of what happens when a
process group leader gets a SIGHUP, and its children themselves
become group leaders on a device that has already been revoked
(i.e. I believe it is an order of operation problem).

Other POSIX compliant OS's do not have this problem, and SVR2,
SVR3, Xenix 2.x, Xenix 3.x, Microport UNIX, ISC UNIX, Altos
Xenix, Altos UNIX, UNICOS, HP/UX, SunOS, and Solaris all appear
to disagree with FreeBSD (even though some are admittedly not
POSIX compliant).

Further, if a program is using non-blocking I/O, there does not
appear to be a way for the program to distiguish between an EOF
based failure, and one that results from a lack of available
data on a valid descriptor.

Please see POSIX 1003 or the "Go Solo 2" book for details on
tty revocation.  I also suggest reference to "The Magic Garden
Explained" and "The Design and Implementation of the 4.3 BSD
UNIX Operating System", in paticular, the section on both tty
handling on on-to-off DCD transition for a tty on which modem
control is enables, and on pty handling in the case that the
master is closed.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.


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




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