Mailinglist Archive: opensuse-programming (33 mails)

< Previous Next >
Re: [suse-programming-e] EAGAIN on a blocking socket?
  • From: "Steve Graegert" <graegerts@xxxxxxxxx>
  • Date: Thu, 2 Mar 2006 19:04:55 +0100
  • Message-id: <6a00c8d50603021004p132c18d0qcd2025898f8825d3@xxxxxxxxxxxxxx>
On 3/2/06, Per Jessen <per@xxxxxxxxxxxx> wrote:
> OK, for the benefit of others listening in, this is what I've briefly
> described to Steve and Anders on suse-linux-e - who both said "it's
> impossible" - which I agree with. Reality however seems to be of a
> different opinion.



did not have time to take a closer look at your code, but I think that
fputs(3) itself is not the culprit since it does not necessarily set
errno when EOF is encountered (write(2) on the other hand, which is
called on behalf of fputs(2), does). Instead you're duplicating the
FDs before associating it with a stream and the call to fcntl(2) call
causes the other (new) FD to be put into non-blocking (O_NONBLOCK) as
well since the data structures in the kernel are shared among them.


< Previous Next >
List Navigation