Subject: Re: fifo & stdio ?
To: Frederick Bruckman <fb@enteract.com>
From: Hubert Feyrer <feyrer@rfhs8012.fh-regensburg.de>
List: netbsd-users
Date: 06/15/1999 04:28:56
On Mon, 14 Jun 1999, Frederick Bruckman wrote:
> The "problem" is, that since the pipe is non-blocking, there's no
> guarantee that any characters will be returned. fgets() could return
> EAGAIN or EINTR and no characters, or it could return some number
> less than you requested. It seems that EAGAIN="Resource temporarily
> unavailable" is most common. This is after a select() and connect(),
> on a socket, too. It might be interesting to see what perror() shows
> in your program.

I've changed the program to also print strerror(errno) when oinking:

miyu% ./fifo 
fp=0x40093410, fd=3
oink! feof=0, strerror=Undefined error: 0
oink! feof=1, strerror=No message of desired type
oink! feof=1, strerror=No message of desired type
oink! feof=1, strerror=No message of desired type
oink! feof=1, strerror=No message of desired type

All I can say there is but Hey! There *is* a message and I don't know of
any "desired type" - just read it (remember that I do the "oink" part
before checking for some message, which explains the first errno=0). 

Why does this sound more and more like a but in NetBSD to me?


 - Hubert

-- 
NetBSD - Better for your uptime than Viagra