remove redundant tests and terminate using process return codes
Merge pull request #2 from ornicar/master

remove redundant tests and terminate using process return codes