The terminate signal is not being received for unknown reasons.
The signals are unblocked for the child process.
And yet, it continues to block.
The final part of the terminate due to signal is to forcibly terminate (sending the kill signal).
This is now happening for child processes.
Sending the kill signal allieviates the problem where the controller program will not terminate.
This fix causes the reduces the severity of the problem such that the terminate should still terminate.
However, this fix does not solve the problem with the terminate signal not being received by a child process that is not blocking the signal as far as I can tell.
}
for (j = 0; j < process->childs.size; ++j) {
- process->childs.array[j] = 0;
+
+ if (process->childs.array[j]) {
+
+ // A hackish way to determine if the child process exists, and if it does then forcibly terminate it.
+ if (getpgid(process->childs.array[j]) >= 0) {
+ f_signal_send(F_signal_kill, process->childs.array[j]);
+ }
+
+ process->childs.array[j] = 0;
+ }
} // for
process->childs.used = 0;