Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: poll <-> select



On Saturday, March 9, 2002, at 10:56 , email@hidden wrote:
There's some code I need to port that contains calls to

poll

Although the man pages describe poll, it actually isn't available in
current Darwin builds. I was directed to use

select

as a replacement. However, both these suckers are new territory to me.
Can someone offer advises on wrapping select to act like poll, or on
replacing poll altogether?

I wrote a drop-in replacement for poll.h that I've used several times
when porting to Darwin / Mac OS X. It's not very fast and takes 4K of
stack space, but it is thread-safe and can handle any number of file
deescriptors up to the kernel per-process maximum.
http://www.sealiesoftware.com/fakepoll.h

There is also poll emulation code in the perl source code that is based on select(). I've successfully used that code on a couple of occasions.

Jason
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.