Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Who called Perl?

by Anonymous Monk
on Mar 02, 2015 at 09:34 UTC ( [id://1118381]=note: print w/replies, xml ) Need Help??


in reply to Who called Perl?

On Linux it's
$ perl -E 'my $parent = getppid(); open my $fh, "<", "/proc/$parent/comm"; print <$fh>' bash
The proc directory has a number of other interesting files.

Replies are listed 'Best First'.
Re^2: Who called Perl?
by Anonymous Monk on Mar 02, 2015 at 12:45 UTC

    ... with the caveat that orphaned processes get adopted by init (process 1). Might want to test for that.

    Also, there's a potential for race in there.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-20 11:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found