X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-posix_spawn2.c;h=92f5d4ab10abd4adfd968c7bd5c28b76f1ac0803;hb=fac94349f25305566277d15b965fa8f4efe66613;hp=174f1a0bcb1d31c39a03b3ac32c49a031e123d23;hpb=7a3dd56e54ef658e2827071e03e143d32e422019;p=gnulib.git diff --git a/tests/test-posix_spawn2.c b/tests/test-posix_spawn2.c index 174f1a0bc..92f5d4ab1 100644 --- a/tests/test-posix_spawn2.c +++ b/tests/test-posix_spawn2.c @@ -1,5 +1,5 @@ /* Test of posix_spawn() function. - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -33,35 +33,6 @@ extern char **environ; -#ifndef STDIN_FILENO -# define STDIN_FILENO 0 -#endif -#ifndef STDOUT_FILENO -# define STDOUT_FILENO 1 -#endif -#ifndef STDERR_FILENO -# define STDERR_FILENO 2 -#endif - -#ifndef WTERMSIG -# define WTERMSIG(x) ((x) & 0x7f) -#endif -#ifndef WCOREDUMP -# define WCOREDUMP(x) ((x) & 0x80) -#endif -#ifndef WEXITSTATUS -# define WEXITSTATUS(x) (((x) >> 8) & 0xff) -#endif -#ifndef WIFSIGNALED -# define WIFSIGNALED(x) (WTERMSIG (x) != 0 && WTERMSIG(x) != 0x7f) -#endif -#ifndef WIFEXITED -# define WIFEXITED(x) (WTERMSIG (x) == 0) -#endif -#ifndef WIFSTOPPED -# define WIFSTOPPED(x) (WTERMSIG (x) == 0x7f) -#endif - #define CHILD_PROGRAM_FILENAME "test-posix_spawn2.sh" static int @@ -77,7 +48,7 @@ fd_safer (int fd) } return fd; -} +} int main () @@ -124,9 +95,9 @@ main () || (err = posix_spawnp (&child, "/bin/sh", &actions, &attrs, argv, environ)) != 0)) { if (actions_allocated) - posix_spawn_file_actions_destroy (&actions); + posix_spawn_file_actions_destroy (&actions); if (attrs_allocated) - posix_spawnattr_destroy (&attrs); + posix_spawnattr_destroy (&attrs); sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL); errno = err; perror ("subprocess failed");