View Single Post
  #3 (permalink)  
Old September 10th, 2003, 11:47 AM
ohwail ohwail is offline
Registered User
Join Date: Sep 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ohwail

Thats the thing I am already using fork() to call a child process to execute my command, but fork() issues a block in which I have to wait until the child is done before control is returned to the parent. I think I need to not include a wait() and trap the signal of the child when its done. Does anyone know how to trap the signal of a terminated child. I am going to palce and example of what I am trying to do. Notice I go back to command prompt after I hit enter and not wait for the grep command to finish executing.

[oci]$ grep back oci.c
[7] 5066
  int i, status, backg, direct;
      backg = 0;
          backg = 0;
[7] Done grep back oci.c

Reply With Quote