This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: error setting pipe to non-blocking IO


Actually, it looks like this might work. YMMV

On Fri, 17 Oct 2003, Brian Ford wrote:

> On Fri, 17 Oct 2003, Andy Howell wrote:
>
> > I am trying to setup a pipe to do non-blocking IO:
> >
> > int main()
> > {
> > 	int pipefd[2];
> > 	int n;
> > 	n = 1;
> >
> > 	pipe(pipefd);
> > 	perror("Pipe: ");
> > 	ioctl(pipefd[0], FIOBIO, &n);
> >
use:
        fcntl(pipefd[0], F_SETFL, O_NONBLOCK);
instead.

PTC for FIOBIO, although I can't even find what header that's in?

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax:   314-551-8444

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]