handle case when process failed to start
(cherry picked from commit 61068a9)