diff options
author | Ævar Arnfjörð Bjarmason <avar@cpan.org> | 2010-04-15 17:12:04 +0000 |
---|---|---|
committer | Steffen Mueller <smueller@cpan.org> | 2010-04-15 19:50:48 +0200 |
commit | 7636ea95c57762930accf4358f7c0c2dec086b5e (patch) | |
tree | 32db84fa5f459bc2276fe180194ba66333fdf7c4 /handy.h | |
parent | 17fddc5cffca4f968d3565ff012c0cfb3af40d68 (diff) | |
download | perl-7636ea95c57762930accf4358f7c0c2dec086b5e.tar.gz |
Set the legacy process name with prctl() on assignment to $0 on Linux
Ever since perl 4.000 we've only set the POSIX process name via
argv[0]. Unfortunately on Linux the POSIX name isn't used by utilities
like top(1), ps(1) and killall(1).
Now when we set C<$0 = "hello"> both C<qx[ps h $$]> (POSIX) and
C<qx[ps hc $$]> (legacy) will say "hello", instead of the latter being
"perl" as was previously the case.
See also the March 9 2010 thread "Why doesn't assignment to $0 on
Linux also call prctl()?" on perl5-porters.
Diffstat (limited to 'handy.h')
-rw-r--r-- | handy.h | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -214,8 +214,7 @@ typedef U64TYPE U64; * GMTIME_MAX GMTIME_MIN LOCALTIME_MAX LOCALTIME_MIN * HAS_CTIME64 HAS_LOCALTIME64 HAS_GMTIME64 HAS_DIFFTIME64 * HAS_MKTIME64 HAS_ASCTIME64 HAS_GETADDRINFO HAS_GETNAMEINFO - * HAS_INETNTOP HAS_INETPTON CHARBITS HAS_PRCTL_SET_NAME - * HAS_PRCTL + * HAS_INETNTOP HAS_INETPTON CHARBITS HAS_PRCTL * Not (yet) used at top level, but mention them for metaconfig */ |