Thu 15 Dec 2005 01:28:20 PM UTC, original submission:
The test is like this:
if echo 'r /nonexist-file
q' | ex > /dev/null; then
broken
fi
and I note that GNU ex, for instance, fails this. Moreover, by my reading of the POSIX spec for ex any POSIX-compliant ex should fail this test, because it says:
# When any error is encountered and the standard input is not a
# terminal device file, ex shall not write the file or return to
# command or text input mode, and shall terminate with a non-zero
# exit status.
The problem we're trying to catch here is that some broken versions of vi return that non-zero exit status if there's an error during an interactive session (I think). We can hardly test for that in a configure script.
So I think we have two choices:
(1) remove this test and have the whatnowsbr code always ignore vi return codes (this is what it is effectively doing now because the test is broken)
(2) remove this test and treat vi like every other editor, and rely on the FAQ entry for anybody who's still using hideous broken AT&T vi.
I think I'd vote for (2).
|