Fix wrong detection when run in background in shell script
Merge pull request #228 from davedoesdev/master

Fix wrong detection when run in background in shell script