diff options
Diffstat (limited to 'posix/tst-spawn5.c')
-rw-r--r-- | posix/tst-spawn5.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/posix/tst-spawn5.c b/posix/tst-spawn5.c index 6b3d11c..7850f3d 100644 --- a/posix/tst-spawn5.c +++ b/posix/tst-spawn5.c @@ -33,6 +33,7 @@ #include <arch-fd_to_filename.h> #include <array_length.h> +#include <tst-spawn.h> /* Nonzero if the program gets called via `exec'. */ static int restart; @@ -161,14 +162,13 @@ spawn_closefrom_test (posix_spawn_file_actions_t *fa, int lowfd, int highfd, args[argc] = NULL; TEST_VERIFY (argc < argv_size); - pid_t pid; - int status; + PID_T_TYPE pid; + siginfo_t sinfo; - TEST_COMPARE (posix_spawn (&pid, args[0], fa, NULL, args, environ), 0); - TEST_COMPARE (xwaitpid (pid, &status, 0), pid); - TEST_VERIFY (WIFEXITED (status)); - TEST_VERIFY (!WIFSIGNALED (status)); - TEST_COMPARE (WEXITSTATUS (status), 0); + TEST_COMPARE (POSIX_SPAWN (&pid, args[0], fa, NULL, args, environ), 0); + TEST_COMPARE (WAITID (P_PID, pid, &sinfo, WEXITED), 0); + TEST_COMPARE (sinfo.si_code, CLD_EXITED); + TEST_COMPARE (sinfo.si_status, 0); } static void |