Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Re: Re: Re: Re: fcntl on Windows

by Adam (Vicar)
on Mar 20, 2001 at 20:23 UTC ( [id://65826]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: Re: Re: Re: fcntl on Windows
in thread fcntl on Windows

Ooops. We are chasing a red herring. As "Programming Perl 2ed"(166) explains:
fcntl will produce a fatal error if used on a machine that doesn't implement fcntl(2). On machines that do implement it, you can do such things as modify the close-on-exec flags, modify the non-blocking I/O flags, emulate the lockf(3) function...
In otherwords, you are SOL on Windows machines. Your best alternative is to loop on select with a very small timeout. The use of polling to achieve non-blocking is not-uncommon, but it is probably slower and more processor intensive (I don't really know.) So then you will want to implement this twice, once for when $^O eq 'MSWin32' and once for when it doesn't.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://65826]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.