Using alarm would mean that there is a max amount of seconds the child process would take. The purpose of this script is to load files into a database. The size of the files will always differ and so the length of time would also. I am assuming you mean to wrap the child in an alarm eval. Please correct me if I am thinking of alarm incorrectly.
You didn't really indicate how long the system calls take. If you know they normally take e.g 4 minutes then an alarm of five minutes would resolve your problem. Though that's really more of a workaround. I will bump this to the frontpage to increase the chances that soemone more familiar with with forking and signal handling will look at at it.