Subject: | [PATCH] check_pid_file() invokes ps incorrectly |
In Net::Server::Daemonize's check_pid_file() function, it invokes ps thusly:
$exists = `ps h o pid p $current_pid`;
I suspect this is to generate a one line output of the pid if it's running. The comment above it
notes "this will fail on Unix98 syntax ps (Solaris, etc)"; Mac OS X can be added to the list.
For SUSv3-compliant implementations, the following invocation delivers the same output:
ps -o pid -p 1 | tail +2