aboutsummaryrefslogtreecommitdiff
path: root/libiberty/pex-unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'libiberty/pex-unix.c')
-rw-r--r--libiberty/pex-unix.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libiberty/pex-unix.c b/libiberty/pex-unix.c
index af98062..f3a1cc9 100644
--- a/libiberty/pex-unix.c
+++ b/libiberty/pex-unix.c
@@ -695,6 +695,7 @@ pex_unix_exec_child (struct pex_obj *obj ATTRIBUTE_UNUSED,
{
*err = ret;
*errmsg = "posix_spawnp";
+ pid = -1; /* The value of pid is unspecified on failure. */
goto exit;
}
}
@@ -705,6 +706,7 @@ pex_unix_exec_child (struct pex_obj *obj ATTRIBUTE_UNUSED,
{
*err = ret;
*errmsg = "posix_spawn";
+ pid = -1;
goto exit;
}
}