summaryrefslogtreecommitdiffhomepage
path: root/src/internal/slibtool_spawn_impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/internal/slibtool_spawn_impl.h')
-rw-r--r--src/internal/slibtool_spawn_impl.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/internal/slibtool_spawn_impl.h b/src/internal/slibtool_spawn_impl.h
index 3966fcb..1abfbe9 100644
--- a/src/internal/slibtool_spawn_impl.h
+++ b/src/internal/slibtool_spawn_impl.h
@@ -7,6 +7,7 @@
#include <limits.h>
#include <unistd.h>
#include <stdbool.h>
+#include <errno.h>
#include <sys/wait.h>
#ifndef PATH_MAX
@@ -33,7 +34,6 @@ static inline int slbt_spawn(
{
pid_t pid;
-
#ifdef SLBT_USE_POSIX_SPAWN
if (posix_spawnp(
@@ -62,6 +62,7 @@ static inline int slbt_spawn(
ectx->program,
ectx->argv);
+ errno = 0;
ectx->pid = pid;
if (fwait)