Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Mar 2003 22:44:34 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Peter Pentchev <roam@ringlet.net>
Cc:        Luigi Rizzo <rizzo@icir.org>, "" <net@FreeBSD.ORG>, Tristan Goode <tgoode@iprimus.com.au>
Subject:   Re: write(2) SIGPIPE on a closed socket?
Message-ID:  <20030319223311.U8508@gamplex.bde.org>
In-Reply-To: <20030319095842.GC27330@straylight.oblivion.bg>
References:  <20030319093002.GT468@straylight.oblivion.bg> <20030319013748.A84035@xorpc.icir.org> <20030319094506.GB27330@straylight.oblivion.bg> <20030319095842.GC27330@straylight.oblivion.bg>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 19 Mar 2003, Peter Pentchev wrote:

> Actually, I wonder if I have answered my own question.  dnscache seems
> to use poll(2), and it would be poll(2)'s task to notify the program of
> any exceptional (error) conditions.  I wonder if it is possible that
> dnscache does not handle POLLERR properly... Let me check.

Everything in poll() except flags for non-exceptional i/o is defective
in FreeBSD.  E.g., POLLERR is not ever referenced in `find /sys/ -name
*.c`, and POLLHUP is only supported for keyboards, ptys, very dead
ttys (ones with no tty struct but not hung up ones), ordinary pipes
and revoked fd's.

write(2) may still fail after poll(2) finds something to write on
because anything may go away after it is found.

Bruce

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




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