[Israel.pm] change proccess name of a forked apache process
Itzik Lerner - Orpak
itzik at orpak.co.il
Mon Jul 19 07:18:05 PDT 2004
Thanks Migo, this works usual but not under mod_perl
From: Mikhael Goikhman [mailto:migo at homemail.com]
Sent: Monday, July 19, 2004 3:09 PM
To: Perl in Israel
Subject: Re: [Israel.pm] change proccess name of a forked apache process
On 19 Jul 2004 15:49:23 +0200, Itzik Lerner - Orpak wrote:
> I need to change the process name ( as it will be displayed by ps) of a
> After I fork'd out from mod_perl under Apache.
> [...] I get a new process with it's own pid, but when looking of the
> output of ps, the process name is 'httpd',
> I want to change it to something else.
You may modify $0, and this will be reflected in ps on many systems. Try:
perl -we '$0 = "my-important-process"; sleep 100'
perl -e 'print+chr(64+hex)for+split//,d9b815c07f9b8d1e'
Perl mailing list
Perl at perl.org.il
More information about the Perl