Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: exec sometimes changes pid

by doom (Deacon)
on Aug 03, 2009 at 01:12 UTC ( #785320=note: print w/replies, xml ) Need Help??


in reply to Re: exec sometimes changes pid
in thread exec sometimes changes pid

I've done this sort of thing for a number of different reasons, usually involving driving emacs code from perl. For example, I've written test code in perl that spins off an emacs window, and captures an image of it. The parent perl process then kills the emacs, and examines the image to see if it looks okay (has the right number of colors, for example).

The work around that I had in mind was to run the child with a munged program name, then do a "ps ax" listing, and grep for the munged name. That would get me the actual pid of the child to kill. Your idea looks a bit simpler (if a little less surgical).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://785320]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2016-12-08 17:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (144 votes). Check out past polls.