[PATCH] Don't read from result pipe if bg process was killed