graceful quit on err
check process running in posix and windows