This is the mail archive of the cygwin mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On 7/7/06, Darryl Miles wrote:Dave Korn wrote: > On 07 July 2006 01:31, Darryl Miles wrote: The underlying socket is still being used in blocking mode.
Socket?? What is this socket?
Which means when we write write 1024 bytes of data but only one PIPE buffer is free (ulimit -p) a POSIX kernel would allow:
What is "one PIPE buffer (ulimit -p)"?
Non-blocking:
write(fd, buffer, 1024) = 512 write(fd, &buffer[512], 512) = -1 (EAGAIN)
Blocking:
write(fd, buffer, 1024) = 512 write(fd, &buffer[512], 512) = [blocking occurs until] 512
SUSv3 does not permit this behaviour. It is quite clear on this point: "If the O_NONBLOCK flag is clear, a write request may cause the thread to block, but on normal completion it shall return nbyte."
I would guess under WIN32 we end up with fhandler.cc:raw_write() doing:
WriteFile(hPipe, buffer, 1024, &writtenLen, 0) = [blocking occurs until] TRUE (writtenLen=1024)
This gives the SUSv3-mandated behaviour for blocking pipes (modulo signal-interruptibility).
What does "simulate 'ulimit -p'" mean? ulimit -p works just fine on cygwin: $ ulimit -p 8
-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |