From f6e75bf0240fbf2b4e7f5dfc7d70de546241bbdd Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Mon, 17 Aug 2009 12:09:04 -0600 Subject: Pick up gnulib fixes for sub-process execution. * gnulib: Update. * tests/others.at (stdin and stdout closed): New test, to avoid regression introduced on 1.4 branch on 2008-07-17. * NEWS: Document the change. Signed-off-by: Eric Blake (cherry picked from commit d3237b2af19c80fc80218fd33eb64266be510be8) --- ChangeLog | 6 ++++++ NEWS | 6 +++++- gnulib | 2 +- tests/others.at | 16 ++++++++++++++++ 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index df680192..21b662cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-08-24 Eric Blake + Pick up gnulib fixes for sub-process execution. + * gnulib: Update. + * tests/others.at (stdin and stdout closed): New test, to avoid + regression introduced on 1.4 branch on 2008-07-17. + * NEWS: Document the change. + A status of 127 does not always imply esyscmd failure. * modules/gnu.c (esyscmd): Silence gnulib message; regression introduced 2009-03-13. diff --git a/NEWS b/NEWS index 0c669fd8..819dfeee 100644 --- a/NEWS +++ b/NEWS @@ -338,7 +338,11 @@ contains the following beta features that were deemed worth deferring until * Noteworthy changes in Version 1.4.14 (2009-??-??) [stable] Released by Eric Blake, based on git version 1.4.13.* -** Fix regression introduced in 1.4.13 in the `esyscmd' builtin, where +** Fix regression introduced in 1.4.12 where executing with stdout closed + could crash m4 on exit on some platforms. + +** Fix regressions introduced in 1.4.13 in the `esyscmd' builtin, where + closed file descriptors could interfere with child execution, and where a child status of 127 made m4 print a spurious message to stderr. ** A number of portability improvements inherited from gnulib. diff --git a/gnulib b/gnulib index 836f3974..2d8b95d6 160000 --- a/gnulib +++ b/gnulib @@ -1 +1 @@ -Subproject commit 836f3974faad2f3de7bafd46719b77d6632a4c96 +Subproject commit 2d8b95d62cc4d6524fa6c4dbc3138d88a5839159 diff --git a/tests/others.at b/tests/others.at index f95d80f6..5ff1bb06 100644 --- a/tests/others.at +++ b/tests/others.at @@ -737,6 +737,22 @@ m4 FOO AT_CLEANUP +## ----------------------- ## +## stdin and stdout closed ## +## ----------------------- ## + +AT_SETUP([stdin and stdout closed]) + +dnl no error when only stderr is used +AT_DATA([in.m4], [[esyscmd(echo hi >&2 && echo err"print(bye +)d"nl)dnl +]]) +AT_CHECK_M4([in.m4 >&-], [0], [], [[hi +bye +]], [-]) + +AT_CLEANUP + ## ------------- ## ## stdout closed ## ## ------------- ## -- cgit v1.2.1