Re: g_io_unix_read/g_io_unix_write
- From: David Benson <daveb idealab com>
- To: Gtk Development List <gtk-devel-list redhat com>
- Subject: Re: g_io_unix_read/g_io_unix_write
- Date: Fri, 3 Mar 2000 14:29:02 -0800 (PST)
> 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]