Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: How to close all open file descriptors after a fork?

by jasonk (Parson)
on Jul 19, 2005 at 14:04 UTC ( #476099=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # from perlfaq5
    require ’sys/syscall.ph’;
    $rc = syscall(&SYS_close, $fd + 0);  # must force numeric
    die "can’t sysclose $fd: $!" unless $rc == -1;
    
  2. or download this
    #!/usr/bin/perl -w
    require 'sys/syscall.ph';
    ...
        warn "Can't sysclose $fd: $!" unless $rc == -1;
      }
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://476099]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2014-07-13 05:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (246 votes), past polls