Proc::PID::File and already locked: Bad file descriptor error

You are using Proc::PID::File and you got
Died at Wed Mar 23 07:50:54 2016: pid “/var/run/xxxxxx.pl.pid” already locked: Bad file descriptor

This is due to a file permission issue. e.g. you run the script with a none privileged account, and it needs to generate the pid file in the default location, which is usually /var/run/ and got permission issue.

to fix this issue, you could just do:

Proc::PID::File->running(dir=>”/my/pid/dir”);

Leave a Reply

Your email address will not be published. Required fields are marked *

four × four =