pradeep kumar wrote: > Hi, > > When I run a script say yyy.pl using ab then one of the child process > name is changed to that of the script. > > #cat yyyp.pl > #!/opt/perl/bin/perl > sleep 20; > print "test\n"; > > This is just after the script is started. > # ps -ef | grep www > www 4028 4026 0 17:17:45 ? 0:00 > /opt/hpws/apache/bin/httpd -k start > kumar 4333 4033 1 17:43:25 pts/1 0:00 grep www > www 4027 4026 0 17:17:45 ? 0:00 > /opt/hpws/apache/cgi-bin/yyy.pl > > And this is the way it looks later(after the script ends): > # ps -ef | grep www > kumar 4366 4033 1 17:47:50 pts/1 0:00 grep www > www 4028 4026 0 17:17:45 ? 0:00 > /opt/hpws/apache/bin/httpd -k start > www 4027 4026 0 17:17:45 ? 0:00 > /opt/hpws/apache/bin/httpd -k start > > Is this behaviour normal and expected or is this a bug?
This is basically a feature. For compatibility with plain CGIs, ModPerl::Registry sets $0 to the script name. And whenever Perl can do it, changing $0 also changes the process name. -------------------------------------------------------------------------------- Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5 http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5
signature.asc
Description: OpenPGP digital signature