autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix `set -o posix' again


From: Paul Eggert
Subject: Re: Fix `set -o posix' again
Date: Sat, 21 Jan 2006 14:48:03 -0800
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Ralf Wildenhues <address@hidden> writes:

>> > | elif (set -o posix) >/dev/null 2>&1; then
>> > |   set -o posix
>> > | fi
>> 
>> Why does this hang under AIX?  Can you truss it, or strace it, or whatever?
>
> D'oh.  It waits for stdin and finishes when given an EOF.

Does it work if you redirect from stdin?  Something like this?

elif (set -o posix) </dev/null >/dev/null 2>&1; then
  set -o posix
fi

I think that would be more efficient than ((set -o posix)).

>         * lib/m4sugar/m4sh.m4 (_AS_BOURNE_COMPATIBLE): Allow either of
>         `BASH_VERSION', `KSH_VERSION', or `RANDOM' as indication of ksh
>         or bash, to set the `posix' option.

Well, if possible, I'd rather not limit our universe to bash and ksh.
There might be other shells that have "set -o posix".




reply via email to

[Prev in Thread] Current Thread [Next in Thread]