[434] in Pthreads mailing list archive
Re: fd sharing and non-blocking
daemon@ATHENA.MIT.EDU (Greg Hudson)
Mon Sep 30 14:26:10 1996
To: "Larry V. Streepy, Jr." <streepy@healthcare.com>
Cc: pthreads mailing list <pthreads@MIT.EDU>
In-Reply-To: Your message of "Mon, 30 Sep 1996 12:03:37 MDT."
<32500B79.7FC37B79@healthcare.com>
Date: Mon, 30 Sep 1996 14:05:02 EDT
From: Greg Hudson <ghudson@MIT.EDU>
> Another question: Am I the first person to really hammer on the
> pthreads package socket support?
No, people have used pthreads to do Java ports and experimental news
servers.
> 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.