Re: Conceptual question on writeable file descriptors
- From: fjblurt@xxxxxxxxx
- Date: Mon, 26 Nov 2007 12:28:26 -0800 (PST)
On Nov 26, 11:33 am, K-mart Cashier <cdal...@xxxxxxxxx> wrote:
Say program A closes it's write half of the connection and then
Program B, which was communicating ith Program A (via a pipe), then
tries to write to the fd on Program A. Program A would generate
SIGPIPE right?
If Program A generates a SIGPIPE, how can the fd on Program A be ready
for writing? Ie, if program A closes it's write end, then how can it
be ready for writing?
I'm not entirely sure what you're getting at, but...
With respect to select(2) and the like, "ready for writing" is sort of
a misnomer. A more accurate description is that select(2) returns
when a write to the file descriptor would not block. The write could
succeed or fail, but in either case it will do so at once, without
blocking.
Does that answer your question?
.
- Follow-Ups:
- Re: Conceptual question on writeable file descriptors
- From: K-mart Cashier
- Re: Conceptual question on writeable file descriptors
- References:
- Conceptual question on writeable file descriptors
- From: K-mart Cashier
- Conceptual question on writeable file descriptors
- Prev by Date: Re: new filesystem module
- Next by Date: Re: Conceptual question on writeable file descriptors
- Previous by thread: Conceptual question on writeable file descriptors
- Next by thread: Re: Conceptual question on writeable file descriptors
- Index(es):
Relevant Pages
|
|