Debugging proc fork issues

Fixes to error messages, new_pid calculation fixed, configurable
deadlock detection.