diff options
Diffstat (limited to 'src/process/posix_spawn_file_actions_addopen.c')
-rw-r--r-- | src/process/posix_spawn_file_actions_addopen.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/process/posix_spawn_file_actions_addopen.c b/src/process/posix_spawn_file_actions_addopen.c index 5e2c86d9..af3ca604 100644 --- a/src/process/posix_spawn_file_actions_addopen.c +++ b/src/process/posix_spawn_file_actions_addopen.c @@ -13,7 +13,8 @@ int posix_spawn_file_actions_addopen(posix_spawn_file_actions_t *fa, int fd, con op->oflag = flags; op->mode = mode; strcpy(op->path, path); - op->next = fa->__actions; + if ((op->next = fa->__actions)) op->next->prev = op; + op->prev = 0; fa->__actions = op; return 0; } |