close() of active socket does not work on FreeBSD 6
kostikbel at gmail.com
Tue Dec 12 06:38:19 PST 2006
On Tue, Dec 12, 2006 at 09:08:30AM -0500, Daniel Eischen wrote:
> On Tue, 12 Dec 2006, Kostik Belousov wrote:
> >On Tue, Dec 12, 2006 at 08:18:32AM -0500, Daniel Eischen wrote:
> >>It's also couldn't be entirely solved by fixing it in the
> >>threads library. You could still have a non-threaded
> >>application that waits on a read operation, but receives
> >>a signal and closes the socket in the signal handler.
> >This is not the problem. The read (as syscall being executed) is aborted
> >when signal is delivered. Original poster considered situation where
> >read() is active (in particular, f_count of struct file is incremented
> >by fget, that caused the reported behaviour).
> Even when SA_RESTART is set?
Yes. Since SA_RESTART causes syscall to be reissued, read()
would fail with EBADFD on its own.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-java/attachments/20061212/34ddde3a/attachment.pgp
More information about the freebsd-java