bug-bash
[Top][All Lists]
Advanced

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

Re: botched configure check for /dev/stdin


From: Chet Ramey
Subject: Re: botched configure check for /dev/stdin
Date: Wed, 15 Nov 2006 13:57:21 -0500
User-agent: Thunderbird 1.5.0.8 (Macintosh/20061025)

Paul Jarc wrote:
> Chet Ramey <address@hidden> wrote:
>> Hardcoding `/bin/test' is a tricky business:
> 
> How about "(exec test ...)"?  Or "env test ..."?

Yeah, I considered the first variant.  Something like
(exec test -r /dev/fd/3 3</dev/null) would be close to what I want
for the test I was looking at.

It doesn't protect you from pathological strict-Posix systems that
have /bin/test as:

#! /bin/sh
# or /bin/bash
test "$@"

(like, say, Solaris)

but the number of systems with such a test implementation and bash as
/bin/sh and no /dev/stdin is probably small enough to defer the
complication of a C program.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                       Live Strong.  No day but today.
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/




reply via email to

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