[fpc-pascal] sending signal to child process
tom.carly at commsquare.com
Mon Mar 30 16:11:06 CEST 2009
I have a process A that starts another process B (with TProcess.Create).
I introduced signal handling for SIGHUP, SIGTERM and SIGINT in process A and process B.
The signal handling of process A triggers a call to "fpkill(processA.processid, SIGTERM)" (or "processA.Terminate(0)").
This code is executed when killing process A.
The problem is that the signal handling code of process B is not executed when killing process A (although process B does get killed).
If I launch process B separately and kill it, then the signal handling code of process B is executed. It seems that the signal that is sent from process A to process B is not the same as when you kill it via the command line.
Does anyone have an idea how to solve this?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal