This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
The joy of $0. Undoing the #16399 makes Andreas'
authorJarkko Hietaniemi <jhi@iki.fi>
Sun, 29 Jun 2003 15:41:05 +0000 (15:41 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Sun, 29 Jun 2003 15:41:05 +0000 (15:41 +0000)
commit54bfe034ba642318cf2c7d0b37579f30adef144a
tree9d4a1a11a7d2ea0e6bab798b52a7d08ff374981a
parent52d59bef96c881381bce1bcb84a8c08ce48c2544
The joy of $0.  Undoing the #16399 makes Andreas'
tests (see [perl #22811]) pass (yes, padding with space instead
of nul makes no sense, but that seems to work, maybe Linux does
some deep magic in ps(1)?); moving the PL_origalen computation
earlier makes also the threaded-first case fully pass.

But in general modifying the argv[] is very non-portable.
(e.g. in Tru64 it seems to be limited to the size of the
original argv[0] since the argv[] are not contiguous?)

Everybody should just have setproctitle().

p4raw-id: //depot/perl@19884
mg.c
perl.c
pod/perlvar.pod