Currently BourneShellScript does not try to track the PID of the external process; it assumes that it runs to completion (successfully or not) and then writes the status file. But if the wrapping shell script is killed, or the machine rebooted, this might never occur and the task would hang.
Better to record $$ from the outer sh process and override exitStatus in case no such process still exists. Implies some use of native code.
(TBD whether an analogous fix can be done for Windows as well.)