fix fail fast behavior with nohup
Merge pull request #376 from rubber/fail_fast_for_lengthy_scripts

fix fail fast behavior with nohup