# HG changeset patch # User Jim Meyering # Date 1221343526 -7200 # Node ID f8a8968374716d81ad4289debb617411090830f8 # Parent 344142aabdceda15c00b2a520bf9cca0e0c131de posix-shell.m4: reject opensolaris's "sh (AT&T Research) 1993-12-28 s+" * m4/posix-shell.m4 (gl_POSIX_SHELL): Reject a shell that lets a umask modification leak out of a subshell. Otherwise, the opensolaris /bin/sh would be accepted and thus cause unwarranted failures in the coreutils test suite. diff -r 344142aabdce -r f8a896837471 ChangeLog --- a/ChangeLog Tue Sep 16 10:26:26 2008 +0200 +++ b/ChangeLog Sun Sep 14 00:05:26 2008 +0200 @@ -1,3 +1,11 @@ +2008-09-16 Jim Meyering + + posix-shell.m4: reject opensolaris's "sh (AT&T Research) 1993-12-28 s+" + * m4/posix-shell.m4 (gl_POSIX_SHELL): Reject a shell that lets + a umask modification leak out of a subshell. Otherwise, the + opensolaris /bin/sh would be accepted and thus cause unwarranted + failures in the coreutils test suite. + 2008-09-16 Paolo Bonzini * tests/test-poll.c (connect_to_socket): Allow non-blocking connect diff -r 344142aabdce -r f8a896837471 m4/posix-shell.m4 --- a/m4/posix-shell.m4 Tue Sep 16 10:26:26 2008 +0200 +++ b/m4/posix-shell.m4 Sun Sep 14 00:05:26 2008 +0200 @@ -31,12 +31,16 @@ func_ret_failure () { return 1 } + subshell_umask_sanity () { + (umask 22; (umask 0); test $(umask) -eq 22) + } test "[$](echo foo)" = foo && func_success && ! func_failure && func_ret_success && ! func_ret_failure && - (set x && func_ret_success y && test x = "[$]1") + (set x && func_ret_success y && test x = "[$]1") && + subshell_umask_sanity ' for gl_cv_posix_shell in \ "$CONFIG_SHELL" "$SHELL" /bin/sh /bin/bash /bin/ksh /bin/sh5 no; do