From 819200628308694c4de3a90cb8b4ecdece1393e2 Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 4 Sep 2016 01:04:33 -0400 Subject: slbt_spawn(): reset value of errno after successful child process creation. --- src/internal/slibtool_spawn_impl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/internal/slibtool_spawn_impl.h') 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 #include #include +#include #include #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) -- cgit v1.2.3