perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philippe M. Chiasson" <go...@ectoplasm.org>
Subject Re: [patch mp2] Fixes to $0 handling [Was: <Perl> Directive changes the command name]
Date Fri, 23 Sep 2005 19:32:08 GMT
Philip M. Gollucci wrote:
> Philippe M. Chiasson wrote:
> 
>> I've finally had time to dig deeper in the troubling $0 and process
>> display
>> problems that seem to exist at least on *BSDs and HP-UX.
>>
>> [...]
>>
>> The correct solution (see patch) is:
>>
>>  - Reset $0 to the _real_ argv[0] after calling perl_parse()
>>     /* Also need to fix PL_origalen */
>>     PL_origalen = strlen(argv[0])+1;
>>     /* argv[0] = '/usr/bin/httpd' */
>>     sv_setpv_mg(get_sv("0",0), argv[0]);
>>
>>  - Use the real argv[0] (s->process->argv) and not a copy
> 
> Dear God!
> 
> +1
> 
> The test suite passes 100% with this applied and manual inspection of ps
> looks good.

Great, checked in as change r291193

> That on FreeBSD... hopefully I'll have some Open/Net BSD in the near
> future too.

-- 
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

Mime
View raw message