...
In our operations we have a specialized script(trimurti), that will detach from the spawned of process, i.e. by nohup or via a special program called ecflow_standalone.
This bypass the spawned process termination issue. Also the korn shell error trap uses wait, i.e. to wait for background process to stop.
...