X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fposix_spawn.m4;h=63e94736803aca531b4de6b1fc063b24bcc0ce01;hb=1138b90e8056cdc1d170ed6661223c6e3ec1dab4;hp=89e2f7f06477daa9993a4c9a0eeeab1ef05a9a0d;hpb=979260e3a53de91ae4792e57a6bb801a723a4539;p=gnulib.git diff --git a/m4/posix_spawn.m4 b/m4/posix_spawn.m4 index 89e2f7f06..63e947368 100644 --- a/m4/posix_spawn.m4 +++ b/m4/posix_spawn.m4 @@ -1,5 +1,5 @@ -# posix_spawn.m4 serial 5 -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]) @@ -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