Re: close() of active socket does not work on FreeBSD 6
- From: Kostik Belousov <kostikbel@xxxxxxxxx>
- Date: Tue, 12 Dec 2006 16:24:54 +0200
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.
Attachment:
pgpFuUYr8x2Tb.pgp
Description: PGP signature
- References:
- Re: close() of active socket does not work on FreeBSD 6
- From: Kostik Belousov
- Re: close() of active socket does not work on FreeBSD 6
- From: Arne H. Juul
- Re: close() of active socket does not work on FreeBSD 6
- From: David Xu
- Re: close() of active socket does not work on FreeBSD 6
- From: Arne H. Juul
- Re: close() of active socket does not work on FreeBSD 6
- From: Daniel Eischen
- Re: close() of active socket does not work on FreeBSD 6
- From: Daniel Eischen
- Re: close() of active socket does not work on FreeBSD 6
- From: Kostik Belousov
- Re: close() of active socket does not work on FreeBSD 6
- From: Daniel Eischen
- Re: close() of active socket does not work on FreeBSD 6
- Prev by Date: Re: close() of active socket does not work on FreeBSD 6
- Next by Date: Re: cvs commit: src/sys/net if_ethersubr.c
- Previous by thread: Re: close() of active socket does not work on FreeBSD 6
- Next by thread: Re: close() of active socket does not work on FreeBSD 6
- Index(es):
Relevant Pages
|