Loading ...
Sorry, an error occurred while loading the content.

Killing all children while killing parent

Expand Messages
  • Raghu Ram Murthy
    Hi, I am doing like this. if ($pid = fork) { .... } else { $ret_value = `rsh $host $command; echo $? `; exit($ret_value); } and some where I am killing this
    Message 1 of 1 , Dec 21, 2004
    • 0 Attachment
      Hi,

      I am doing like this.

      if ($pid = fork) {
      ....
      }
      else {
      $ret_value = `rsh $host '$command; echo $?'`;
      exit($ret_value);
      }

      and some where I am killing this child process. While
      killing this I've to make sure that rsh proces also
      should be killed.

      I used setpgrp before doing rsh, and killing with
      kill -9, $pid.

      But if I use setpgrp, rsh is being stopped and hanged
      there. It is not executing the command.

      Any Ideas, suggestions and alternatives are welcomed.

      Thnaks
      -Raghuram

      =====
      ----------------------------------------------
      P.Raghu Ram Murthy, M-tech (Computer Science),
      Member, Information Technology,
      D E Shaw India Software Private Limited,
      6-3-879 & 879/B
      Begumpet, Hyderabad 500 016
      Andhra Pradesh
      India

      Mobile: (+91) 98852 17928
      ----------------------------------------------

      If it doesn't work, you're not hitting it with a big enough hammer

      __________________________________________________
      Do You Yahoo!?
      Tired of spam? Yahoo! Mail has the best spam protection around
      http://mail.yahoo.com
    Your message has been successfully submitted and would be delivered to recipients shortly.