in reply to Killing all processes launched using open()

In general, you need to know what signal handlers are in place to know what to send. If the default SIGHUP handler is effective, you can trick script.sh with kill HUP, $cpid; and it will send an honest SIGHUP to all its children.

After Compline,
Zaxo