Skip Menu |

This queue is for tickets about the Net-Server CPAN distribution.

Report information
The Basics
Id: 80260
Status: resolved
Priority: 0/
Queue: Net-Server

People
Owner: Nobody in particular
Requestors: kjetilho [...] ifi.uio.no
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.006
Fixed in: (no value)



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.
Subject: Re: [rt.cpan.org #80260] Net::Server::_get_commandline results in wrong program name (on Linux)
Date: Thu, 18 Oct 2012 06:17:15 -0600
To: bug-Net-Server [...] rt.cpan.org
From: Rob Brown <bbb [...] cpan.org>
Kjetil, Your suggestion seems appropriate. On Thu, Oct 18, 2012 at 1:31 AM, Kjetil Torgrim Homme via RT <bug-Net-Server@rt.cpan.org> wrote: Show quoted text
> Thu Oct 18 03:31:55 2012: Request 80260 was acted upon. > Transaction: Ticket created by kjetilho@ifi.uio.no > Queue: Net-Server > Subject: Net::Server::_get_commandline results in wrong program name (on > Linux) > Broken in: 2.006 > Severity: Normal > Owner: Nobody > Requestors: kjetilho@ifi.uio.no > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=80260 > > > > _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. >
I agree. I took out the proc fishing in 2.007.