Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Determining Process Information of Win process (a simpler solution)

by Discipulus (Canon)
on Jun 15, 2015 at 15:33 UTC ( [id://1130488]=note: print w/replies, xml ) Need Help??


in reply to Determining Process Information of Win process

Maybe there is a simple solution to this. Add END{ system qq(tasklist /v /fo LIST /fi "PID eq $$") } to your child code and you'll have some useful info. If you want the whole mess of infos add instead END{ system qq(wmic  PROCESS where "processid=$$" get * /FORMAT:LIST) }
#cat child.pl use strict; use warnings; print "I'm the child with PID $$\n"; sleep 3; print "Exit now.." and exit 0; #END{ system qq(tasklist /v /fo LIST /fi "PID eq $$") } END{ system qq(wmic PROCESS where "processid=$$" get * /FORMAT:LIST) +} # call it from a oneliner perl -e "system ($^X, qq(child.pl))" I'm the child with PID 298184 Exit now.. Caption=perl.exe CommandLine=C:\Perl\bin\perl.exe child.pl [...] ProcessId=298184 [...]

HtH
L*
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (4)
As of 2024-04-26 04:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found