summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorGisle Aas <gisle@activestate.com>2006-01-11 09:52:18 +0000
committerGisle Aas <gisle@activestate.com>2006-01-11 09:52:18 +0000
commita2722ac963c473daf784eb7bed19dab587ac5fe6 (patch)
treef27669fcacf60c3d00a4728fd26e8c55b50264a2 /mg.c
parent7b3f41f48f08e2c852bc36ce5a178ec9102a33f7 (diff)
downloadperl-a2722ac963c473daf784eb7bed19dab587ac5fe6.tar.gz
Make setting 'PL_origalen = 1' before perl_parse() disable
argv[0] munging when $0 is assigned to. p4raw-id: //depot/perl@26779
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mg.c b/mg.c
index 3e3ebfd3c5..87cea48081 100644
--- a/mg.c
+++ b/mg.c
@@ -2540,7 +2540,7 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg)
/* The BSDs don't show the argv[] in ps(1) output, they
* show a string from the process struct and provide
* the setproctitle() routine to manipulate that. */
- {
+ if (PL_origalen != 1) {
s = SvPV_const(sv, len);
# if __FreeBSD_version > 410001
/* The leading "-" removes the "perl: " prefix,
@@ -2561,7 +2561,7 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg)
}
#endif
#if defined(__hpux) && defined(PSTAT_SETCMD)
- {
+ if (PL_origalen != 1) {
union pstun un;
s = SvPV_const(sv, len);
un.pst_command = (char *)s;