[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fix `set -o posix' again
From: |
Ralf Wildenhues |
Subject: |
Re: Fix `set -o posix' again |
Date: |
Thu, 9 Feb 2006 15:28:16 +0100 |
User-agent: |
Mutt/1.5.11 |
Hello Paul, Howard, Bruce,
This issue is not solved: a few days ago I encountered it on a different
AIX 5.3 system (note Howard reported it for AIX 5.1): I believe I saw
exactly the issues Howard reported, which I did not before. Now, some
days later, I see yet slightly different issues. :-/
To tell you the truth, I'm a bit at a loss how to go about this.
I have access to systems to test on, but not a lot of experience,
can neither change system settings nor reboot, nor will I test
stuff if that could endanger production operation.
IOW: help greatly appreciated.
* Paul Eggert wrote on Sat, Jan 21, 2006 at 11:48:03PM CET:
> 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
No. When done like this, `configure' will remain completely silent:
no `checking for..' lines, nothing, but otherwise do its job.
With `((set -o posix))' (isn't that nonportable syntax, by the way?),
configure exits immediately. I have no idea why, the last truss lines
are
| statx("/tmp", 0x2FF21870, 76, 0) = 0
| open("/tmp", O_RDONLY) = 3
| getdirent(3, 0x20098A18, 4096) = 1168
| lseek(3, 0, 0) = 0
| kfcntl(3, F_GETFD, 0x2FF22FFC) = 0
| kfcntl(3, F_SETFD, 0x00000001) = 0
| getdirent(3, 0x20098A18, 4096) = 1168
| getdirent(3, 0x20098A18, 4096) = 0
| close(3) = 0
| kwrite(2, " . . / l i b t o o l - 2".., 106) = 106
| _exit(1)
Running with `sh -x' gives no clue: output stops at the point the
command is encountered.
> 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".
Sure. This shell has neither of BASH_VERSION or KSH_VERSION. It has
RANDOM, and it presents itself as Version M-11/16/88f. The pdksh clone
in OpenBSD /bin/sh also has RANDOM, but not KSH_VERSION.
Cheers,
Ralf
- Re: Fix `set -o posix' again,
Ralf Wildenhues <=