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
[oci]$
[7] 5066
int i, status, backg, direct;
backg = 0;
/*if(!backg)
backg = 0;
[7] Done grep back oci.c
[oci]$
|