Reputation: 11108
I want all child processes of my perl script to generate core files in case of unexpected failures. So how can I set ulimit
to unlimited
inside perl?
Upvotes: 0
Views: 2154
Reputation: 1640
You have to change the openfiles parameters of the user that launch your perl script. So you can change the limit on-the-fly with:
ulimit -n unlimited && perl path/to/your/script.pl
Or you can make a bash script foo.sh
:
#!/bin/bash
ulimit -n unlimited
perl path/to/your/script.pl
Upvotes: 2