Re: g_io_unix_read/g_io_unix_write
- From: Sebastian Wilhelmi <wilhelmi ira uka de>
- To: gtk-devel-list redhat com
- Subject: Re: g_io_unix_read/g_io_unix_write
- Date: Mon, 06 Mar 2000 17:18:39 +0000
Hi David,
> Although I think it is guaranteed, I cannot find substantiating
> docs :( The whole point of EINTR is to interrupt blocking system
> calls b/c something needs immediate attention. Hence if you aren't
> going to block...
As far as I got it, it is a problem of some OSes, that they can't restart a
read/write or something, after a signal occured. But I might be wrong. Stevens
"Unix Network Programming" suggests that in saying:
"Some kernels automatically restart some interrupted system calls. For
portability when we write a program that catches signals , we must be prepared
for system calls to return EINTR.
> > if (result == G_IO_ERROR_AGAIN ||
> > result == G_IO_ERROR_UNKNOWN && errno == EINTR)
> > /* do it again */
>
> Obviously no one should be forced to write that.
I think, everyone should.
> I don't really have a problem with the patch, I just think
> it is completely unnecessary, b/c all it does is make
> broken code get G_IO_ERROR_AGAIN instead of
> G_IO_ERROR_UNKNOWN.
I dont think, code that gets EINTR is broken.
Bye,
Sebastian
--
Sebastian Wilhelmi | här ovanför alla molnen
mailto:wilhelmi@ira.uka.de | är himmlen så förunderligt blå
http://goethe.ira.uka.de/~wilhelmi |
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]