Mihran Hovsepyan
Mihran Hovsepyan

Reputation: 11108

How to set ulimit to unlimited in perl?

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

Answers (1)

Flat
Flat

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

Related Questions