[Israel.pm] change proccess name of a forked apache process
Mikhael Goikhman
migo at homemail.com
Mon Jul 19 06:09:06 PDT 2004
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
> process
>
> 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'
Regards,
Mikhael.
--
perl -e 'print+chr(64+hex)for+split//,d9b815c07f9b8d1e'
More information about the Perl
mailing list