X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fposix_spawn.m4;h=63e94736803aca531b4de6b1fc063b24bcc0ce01;hb=5e29a7a095a6c960115cf48f5b28278194a0b2ca;hp=3053bdbcbaf571c140706a8da22bfadcb5aaf72b;hpb=8308b9eb6f9aac709f37c0ef5bd136ec9effe0ad;p=gnulib.git diff --git a/m4/posix_spawn.m4 b/m4/posix_spawn.m4 index 3053bdbcb..63e947368 100644 --- a/m4/posix_spawn.m4 +++ b/m4/posix_spawn.m4 @@ -1,5 +1,5 @@ -# posix_spawn.m4 serial 6 -dnl Copyright (C) 2008-2010 Free Software Foundation, Inc. +# posix_spawn.m4 serial 8 +dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -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]) @@ -291,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. */ @@ -309,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; @@ -318,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; } @@ -339,7 +339,7 @@ child_main (void) && memcmp (buf, "Halle Potta", 11) == 0) return 0; else - return 2; + return 8; } static void