projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
getaddrinfo: add EAI_NODATA error code to distinguish NODATA vs NxDomain
[musl]
/
src
/
process
/
posix_spawn_file_actions_addfchdir.c
diff --git
a/src/process/posix_spawn_file_actions_addfchdir.c
b/src/process/posix_spawn_file_actions_addfchdir.c
index
436c683
..
e89ede8
100644
(file)
--- a/
src/process/posix_spawn_file_actions_addfchdir.c
+++ b/
src/process/posix_spawn_file_actions_addfchdir.c
@@
-6,6
+6,7
@@
int posix_spawn_file_actions_addfchdir_np(posix_spawn_file_actions_t *fa, int fd)
{
+ if (fd < 0) return EBADF;
struct fdop *op = malloc(sizeof *op);
if (!op) return ENOMEM;
op->cmd = FDOP_FCHDIR;