Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Setting $0 clears /proc/PID/environ too

by afoken (Canon)
on Jan 17, 2020 at 12:54 UTC ( #11111519=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
            my $exe=eval { readlink("$dir/exe") };
            say Data::Dumper->new([$argv0,$exe],[qw(argv0 exe)])->Dump();
    }
    
  2. or download this
    /proc/1:
    $argv0 = 'init [4]';
    ...
    /proc/5566:
    $argv0 = 'postgres: stats collector process   ';
    $exe = '/opt/pg9/bin/postgres';
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11111519]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2020-03-31 23:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    To "Disagree to disagree" means to:









    Results (186 votes). Check out past polls.

    Notices?