Detect failed fork() calls; improve error logging.