X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fposix_spawn.m4;h=c3f74949edc6ab2c054077cd85c51e1a56d3f3ec;hb=423d3cac13c30bb0d5f85e5fac6ab1406ed1731a;hp=89e2f7f06477daa9993a4c9a0eeeab1ef05a9a0d;hpb=979260e3a53de91ae4792e57a6bb801a723a4539;p=gnulib.git diff --git a/m4/posix_spawn.m4 b/m4/posix_spawn.m4 index 89e2f7f06..c3f74949e 100644 --- a/m4/posix_spawn.m4 +++ b/m4/posix_spawn.m4 @@ -1,4 +1,4 @@ -# posix_spawn.m4 serial 5 +# posix_spawn.m4 serial 8 dnl Copyright (C) 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -13,7 +13,7 @@ AC_DEFUN([gl_POSIX_SPAWN], AC_DEFUN([gl_POSIX_SPAWN_BODY], [ AC_REQUIRE([gl_SPAWN_H_DEFAULTS]) - AC_CHECK_FUNCS_ONCE([posix_spawn]) + AC_REQUIRE([gl_HAVE_POSIX_SPAWN]) dnl Assume that when the main function exists, all the others, dnl except posix_spawnattr_{get,set}sched*, are available as well. dnl AC_CHECK_FUNCS_ONCE([posix_spawnp]) @@ -69,8 +69,6 @@ AC_DEFUN([gl_POSIX_SPAWN_BODY], ;; *) REPLACE_POSIX_SPAWN=1 ;; esac - else - HAVE_POSIX_SPAWN=0 fi ]) @@ -293,7 +291,7 @@ parent_main (void) if (fflush (fp) || fclose (fp)) { perror ("cannot prepare data file"); - return 1; + return 2; } /* Avoid reading from our stdin, as it could block. */ @@ -311,7 +309,7 @@ parent_main (void) posix_spawn_file_actions_destroy (&actions); errno = err; perror ("subprocess failed"); - return 1; + return 3; } posix_spawn_file_actions_destroy (&actions); status = 0; @@ -320,13 +318,13 @@ parent_main (void) if (!WIFEXITED (status)) { fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status); - return 1; + return 4; } exitstatus = WEXITSTATUS (status); if (exitstatus != 0) { fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus); - return 1; + return 5; } return 0; } @@ -341,7 +339,7 @@ child_main (void) && memcmp (buf, "Halle Potta", 11) == 0) return 0; else - return 2; + return 8; } static void