[linux] Re: Gezocht: Function GetLength(EventQueue)

Folkert van Heusden folkert op vanheusden.com
Zo mei 24 02:24:09 CEST 2009


>     NOTE! There is _not_ a way to query how much you could write to a pipe,
>     though. Although normally I think you should be able to rely on being able
>     to write PIPE_BUF characters if a poll() or select() says ?writable?. But
>     you may be able to write more.

Hmmm is een pipe non-blocking te maken? Dan zou je denk ik een EAGAIN
moeten krijgen als 't niet zou passen. In het EAGAIN geval zou ik het
aantal bytes halveren en nog eens proberen. Als je eerst mte select hebt
gekeken of ie writable is dan zal er uiteindelijk toch op z'n minst 1
byte te schrijven moeten zijn.


Folkert van Heusden

-- 
Ever wonder what is out there? Any alien races? Then please support
the seti op home project: setiathome.ssl.berkeley.edu
----------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com



More information about the Linux mailing list