projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add put*ent functions for passwd/group files and similar for shadow
[musl]
/
src
/
process
/
posix_spawn_file_actions_adddup2.c
diff --git
a/src/process/posix_spawn_file_actions_adddup2.c
b/src/process/posix_spawn_file_actions_adddup2.c
index
9209ee7
..
0367498
100644
(file)
--- a/
src/process/posix_spawn_file_actions_adddup2.c
+++ b/
src/process/posix_spawn_file_actions_adddup2.c
@@
-3,14
+3,15
@@
#include <errno.h>
#include "fdop.h"
#include <errno.h>
#include "fdop.h"
-int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *fa, int
fd, int new
fd)
+int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *fa, int
srcfd, int
fd)
{
struct fdop *op = malloc(sizeof *op);
if (!op) return ENOMEM;
op->cmd = FDOP_DUP2;
{
struct fdop *op = malloc(sizeof *op);
if (!op) return ENOMEM;
op->cmd = FDOP_DUP2;
+ op->srcfd = srcfd;
op->fd = fd;
op->fd = fd;
-
op->newfd = newfd
;
- op->
next = fa->__actions
;
+
if ((op->next = fa->__actions)) op->next->prev = op
;
+ op->
prev = 0
;
fa->__actions = op;
return 0;
}
fa->__actions = op;
return 0;
}