Subject: | Net::Server::_get_commandline results in wrong program name (on Linux) |
_get_commandline prefers to fetch the commandline from /proc when
available. this means that the exec will run "/usr/bin/perl" "-wT"
"/myscript", and this in turn causes the process name stored in
/proc/PID/stat (and /proc/PID/status) to be "perl" rather than
"myscript".
the consequence of this is that tools like pgrep/pkill myscript fail, you
have to run "pkill -HUP myscript" the first time, and then "pkill -HUP
perl" on subsequent HUPs. (obviously, the latter command may have
unwanted consequences :-)
IMHO it would be best to just rip out the code looking in cmdline, I
don't see when it is useful. the code which makes an absolute path when
needed is fine and should be kept.