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/spawni.c | |
parent | Update. (diff) | |
download | glibc-08c7f6b0082b1b645348518fdc42643b5580d87c.tar.gz glibc-08c7f6b0082b1b645348518fdc42643b5580d87c.tar.bz2 glibc-08c7f6b0082b1b645348518fdc42643b5580d87c.zip |
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/spawni.c')
-rw-r--r-- | posix/spawni.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/posix/spawni.c b/posix/spawni.c index e93f488f04..9f10c930f3 100644 --- a/posix/spawni.c +++ b/posix/spawni.c @@ -175,7 +175,8 @@ __spawni (pid_t *pid, const char *file, /* Make sure the desired file descriptor is used. */ if (new_fd != action->action.open_action.fd) { - if (__dup2 (new_fd, action->action.open_action.fd) != 0) + if (__dup2 (new_fd, action->action.open_action.fd) + != action->action.open_action.fd) /* The `dup2' call failed. */ _exit (SPAWN_ERROR); @@ -188,7 +189,8 @@ __spawni (pid_t *pid, const char *file, case spawn_do_dup2: if (__dup2 (action->action.dup2_action.fd, - action->action.dup2_action.newfd) != 0) + action->action.dup2_action.newfd) + != action->action.dup2_action.newfd) /* The `dup2' call failed. */ _exit (SPAWN_ERROR); break; |