diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-05-29 07:31:53 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-05-29 07:31:53 +0000 |
commit | 08c7f6b0082b1b645348518fdc42643b5580d87c (patch) | |
tree | b5280480fa7790ff6f92029378b1311d870c2982 /posix/spawn_faction_adddup2.c | |
parent | 079199de5cdf96f85e29ecedafc69b2fb3004f2b (diff) | |
download | glibc-08c7f6b0082b1b645348518fdc42643b5580d87c.zip glibc-08c7f6b0082b1b645348518fdc42643b5580d87c.tar.gz glibc-08c7f6b0082b1b645348518fdc42643b5580d87c.tar.bz2 |
Update.
2000-05-29 Ulrich Drepper <drepper@redhat.com>
* posix/Makefile (tests): Add tst-spawn.
(tst-spawn-ARGS): New variable.
* posix/tst-spawn.c: New file.
* posix/spawn_faction_addclose.c: Correctly account for new entry.
* posix/spawn_faction_adddup2.c: Likewise.
* posix/spawn_faction_addopen.c: Likewise.
* posix/spawni.c: Correctly test for success of dup2 calls.
* posix/tst-preadwrite.c: Check success of malloc call.
Diffstat (limited to 'posix/spawn_faction_adddup2.c')
-rw-r--r-- | posix/spawn_faction_adddup2.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/posix/spawn_faction_adddup2.c b/posix/spawn_faction_adddup2.c index 482318f..7407cca 100644 --- a/posix/spawn_faction_adddup2.c +++ b/posix/spawn_faction_adddup2.c @@ -42,10 +42,13 @@ posix_spawn_file_actions_adddup2 (posix_spawn_file_actions_t *file_actions, return ENOMEM; /* Add the new value. */ - rec = &file_actions->__actions[file_actions->__allocated]; + rec = &file_actions->__actions[file_actions->__used]; rec->tag = spawn_do_dup2; rec->action.dup2_action.fd = fd; rec->action.dup2_action.newfd = newfd; + /* Account for the new entry. */ + ++file_actions->__used; + return 0; } |