[437] in Pthreads mailing list archive

home help back first fref pref prev next nref lref last post

Re: fd sharing and non-blocking

daemon@ATHENA.MIT.EDU (Larry V. Streepy, Jr.)
Mon Sep 30 15:43:53 1996

Date: Mon, 30 Sep 1996 13:32:35 -0600
From: "Larry V. Streepy, Jr." <streepy@healthcare.com>
To: Greg Hudson <ghudson@MIT.EDU>
Cc: pthreads mailing list <pthreads@MIT.EDU>

Greg Hudson wrote:
> 
> > I think the solution is to have the "ioctl" wrapper understand
> > FIONBIO calls and properly set the __FD_NONBLOCK flag accordingly.
> 
> FIONBIO is not portable.  You should use the POSIX fcntl() to set your
> file descriptors non-blocking.

True.  I'm porting some existing threaded code to Linux and it was using
ioctl.  I modified the pthreads ioctl wrapper to watch for FIONBIO and
set the flags accordingly.

I also checked and the fcntl wrapper "is" getting the flags in the fd
table correct.

Thanks.
-- 
Larry V. Streepy, Jr.
Chief Technical Officer,  Healthcare Communications, Inc.
mailto:streepy@healthcare.com
(214) 851-7033 (Dallas Main #)
(970) 626-5028 (My office #)			(970) 626-4425  (Fax)

home help back first fref pref prev next nref lref last post