projects
/
musl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9848e64
)
fix missing errno from exec failure in posix_spawn
author
Rich Felker
<dalias@aerifal.cx>
Sat, 10 Aug 2013 00:04:05 +0000
(20:04 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Sat, 10 Aug 2013 00:04:05 +0000
(20:04 -0400)
failures prior to the exec attempt were reported correctly, but on
exec failure, the return value contained junk.
src/process/posix_spawn.c
patch
|
blob
|
history
diff --git
a/src/process/posix_spawn.c
b/src/process/posix_spawn.c
index
68cf795
..
c688652
100644
(file)
--- a/
src/process/posix_spawn.c
+++ b/
src/process/posix_spawn.c
@@
-105,6
+105,7
@@
static int child(void *args_vp)
? &attr->__mask : &args->oldmask, 0);
args->exec(args->path, args->argv, args->envp);
? &attr->__mask : &args->oldmask, 0);
args->exec(args->path, args->argv, args->envp);
+ ret = -errno;
fail:
/* Since sizeof errno < PIPE_BUF, the write is atomic. */
fail:
/* Since sizeof errno < PIPE_BUF, the write is atomic. */