Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Re: Re: Re: fcntl on Windows

by Daimun (Novice)
on Mar 21, 2001 at 01:16 UTC ( [id://65825]=note: print w/replies, xml ) Need Help??


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

Trying to tap the well of knowledge here..
What other ways are there to do what fcntl does? I'm not clear on what my other options might be.

Daimun

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: fcntl on Windows
by Adam (Vicar) on Mar 21, 2001 at 01:23 UTC
    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://65825]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-24 04:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found