[mercury-users] posix stuff

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Apr 3 10:19:53 AEST 2001


On 15-Mar-2001, William Lee Irwin III <wli at holomorphy.com> wrote:
> I had a little bit of trouble with the posix select module. It
> didn't seem to update the file descriptor sets which were meant
> to hold its results.

Are you sure?  The code looks fine to me (although it could
be documented better).  I think you have just misunderstood
how it is supposed to work.

The file descriptor sets are accessed via pointers (`fdset_ptr'), and
select/8 modifies what they point to.  The io__state arguments to
select/8 are there not just because of the I/O, but also because of the
side effects on what the file descriptor set pointers point to.  That's
also why fd_isset/5 takes io__state arguments.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list