delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/10/17/18:20:20

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: eos.vss.fsi.com: ford owned process doing -bs
Date: Fri, 17 Oct 2003 17:20:01 -0500 (CDT)
From: Brian Ford <ford AT vss DOT fsi DOT com>
X-X-Sender: ford AT eos
To: cygwin AT cygwin DOT com
Subject: Re: error setting pipe to non-blocking IO
In-Reply-To: <Pine.GSO.4.56.0310171656160.823@eos>
Message-ID: <Pine.GSO.4.56.0310171709410.823@eos>
References: <3F906430 DOT 5000100 AT austin DOT rr DOT com> <Pine DOT GSO DOT 4 DOT 56 DOT 0310171656160 DOT 823 AT eos>
MIME-Version: 1.0

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019