Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: jishu
  • Order by date
  1. jishu

    How to get the PID from a system()

    Hi, I am actually new to fork(). I tried the following script: my $child_pid; if($child_pid = fork()){ system "echo \"kill -9 $child_pid\" >> ttt"; exit 0; } else { exec('./XYZ < a.txt'); } In this case, I store the PID into a file called "ttt" so I can kill it later. This script does...
  2. jishu

    How to get the PID from a system()

    Hi Mike, Thanks for the reply. Is this the only way? Is there an easy way that I can get the PID directly from "System()"? I know "System()" does a fork. Is there a way to get that fork's PID? Thanks. Jiang
  3. jishu

    How to get the PID from a system()

    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...

Part and Inventory Search

Back
Top