Re: g_io_unix_read/g_io_unix_write



> If a read() is interrupted by a signal before it reads any data, it will
> return -1 with errno set to [EINTR]. If a read() is interrupted by a signal
> after it has successfully read some data, it will return the number of bytes
> read. 

You should only get EINTR if the file was not ready for reading.
This should never happen if you properly set yourself up,
for example with g_io_add_watch.

If you get EINTR it is a sign that you should have called
polled the file descriptor first or you should make the fd nonblocking
so you really will get EAGAIN.


- Dave



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]