Link to home
Start Free TrialLog in
Avatar of ggoldsc
ggoldsc

asked on

how do you set ulimit -n 5000 in perl.

How do I set "ulimit -n 5000" in perl so that it
takes affect for child processes.
I tried `ulimit -n 5000` (backtics) but a
subsequent `ulimit -n` showed the value
set back to the default.      
ASKER CERTIFIED SOLUTION
Avatar of monas
monas
Flag of Lithuania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of BRI70
BRI70

Another option is to set your ulimit prior to running your perl program.  Make sure you use the #!/usr/bin/perl shebang line and run perl so that it does not spawn a new shell like this:
ulimit -n 5000; ./my_perl_script_with_shebang_line.pl

Open in new window