Hi,
I have the following code
system ("./XYZ");
I know $$ stores the PID of the perl script. However, how can I get XYZ's pid? Is there a way to get that PID immediately? In my case XYZ can take hours to run. I may want to kill this XYZ process before it finishes. I may initiate XYZ several times before one is finished. So I can't refer them by names.
Thanks.
I have the following code
system ("./XYZ");
I know $$ stores the PID of the perl script. However, how can I get XYZ's pid? Is there a way to get that PID immediately? In my case XYZ can take hours to run. I may want to kill this XYZ process before it finishes. I may initiate XYZ several times before one is finished. So I can't refer them by names.
Thanks.