From: Jeffrey Friedl Date: Sun, 23 Jul 2000 01:31:34 +0000 (-0700) Subject: Use setproctitle() if available to modify $0. X-Git-Tag: accepted/trunk/20130322.191538~34722 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0c9177abdae6e91f4dfdab2ef3cc817ec901e51e;p=platform%2Fupstream%2Fperl.git Use setproctitle() if available to modify $0. Subject: setting $* on BSD4 broken Message-Id: <200007230831.BAA08379@ventrue.yahoo.com> p4raw-id: //depot/perl@6457 --- diff --git a/Configure b/Configure index bf19763..ef5626f 100755 --- a/Configure +++ b/Configure @@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Mon Jul 24 06:41:11 EET DST 2000 [metaconfig 3.0 PL70] +# Generated on Fri Jul 28 01:31:47 EET DST 2000 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.com) cat >/tmp/c1$$ <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_setpent HAS_SETPROTOENT /**/ +/* HAS_SETPROCTITLE: + * This symbol, if defined, indicates that the setproctitle routine is + * available to set process title. + */ +#$d_setproctitle HAS_SETPROCTITLE /**/ + /* HAS_SETPWENT: * This symbol, if defined, indicates that the setpwent routine is * available for initializing sequential access of the passwd database. diff --git a/mg.c b/mg.c index 1b0b135..84fff24 100644 --- a/mg.c +++ b/mg.c @@ -2054,6 +2054,9 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg) for (i = 1; i < PL_origargc; i++) PL_origargv[i] = Nullch; } +#ifdef HAS_SETPROCTITLE + setproctitle("%s", SvPV_nolen(sv)); +#endif break; #endif #ifdef USE_THREADS