fix race in (linux) OS::process_exists
subprocess: fix race and allow retrieval of pid