aboutsummaryrefslogtreecommitdiff
path: root/posix/spawni.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-05-29 07:31:53 +0000
committerUlrich Drepper <drepper@redhat.com>2000-05-29 07:31:53 +0000
commit08c7f6b0082b1b645348518fdc42643b5580d87c (patch)
treeb5280480fa7790ff6f92029378b1311d870c2982 /posix/spawni.c
parent079199de5cdf96f85e29ecedafc69b2fb3004f2b (diff)
downloadglibc-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/spawni.c')
-rw-r--r--posix/spawni.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/posix/spawni.c b/posix/spawni.c
index e93f488..9f10c93 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;