I’m using signal(SIGCHLD, sigFunc) to catch exit of child process
instead of using wait() ( since I don’t want to be in suspend state in
my parent process), my child process is script.

It’s works fine when the script normally exit.
In smoe cases I need to abort the script from the parent process and I
want to catch SIGCHLD in the same way as normal exit.
I abort the script by system(“kill -SIGTERM pid”) but I don’t get the
(pid is the process id of the script, returned by spawn)

How can I “kill” the script from parent process and I can get the