Subject: Re: Option to make cpp(1) not accept named pipes or devices as include
To: Jim Wise <jwise@draga.com>
From: Andrew Brown <atatat@atatdot.net>
List: tech-toolchain
Date: 11/30/2004 08:52:54
On Tue, Nov 30, 2004 at 01:54:18AM -0500, Jim Wise wrote:
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>On Mon, 29 Nov 2004, Andrew Brown wrote:
>
>>>Eh? From $PATH to $EDITOR to $TERM, lot's of programs alter their
>>>behavior based on environment variables.
>>
>>that's a silly argument. :)
>>
>>*lots* of programs use $PATH and and $EDITOR (or $VISUAL -- why are
>>there two?) or $TERM, but only cpp will use your CPP_RESTRICTED
>>variable.
>
>VISUAL and EDITOR are both around because historically programs will try
>to use VISUAL, and fall back to EDITOR if running on a dumb terminal.
>Of course dumb terminals are pretty rare these days. :-)
ah, okay. that works. thanks for the history lesson. :)
>More generally, it remains the case that lots of programs use
>environment variables to cause a change in behavior -- even environment
>variables (such as EXRC) which are only used by a single program or by
>two closely related programs.
okay, that's true as well, but i think for EXRC it's a matter of
convenience. adding a new command line option that i needed to use
when invoking vi would add up to thousands more characters that i had
to type every day. otoh, i don't think i recall the last time i
invoked cpp by hand, so adding a new command line option there would
have little to no impact.
>cpp(1) itself has other variables which only it uses within our system.
>The larger point here is that neither way is `more' unix-like. As to
>which way is better in this case, I've made my arguments on that matter
>elsewhere in this thread, but I'm not particularly wedded to them. :-)
as long as you make them both work, that should be fine. i have to
wonder, though, why cpp would want to continue being able to read from
named pipes (etc) by default, and that perhaps the ability to do so
might be a better option.
--
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org * "ah! i see you have the internet
twofsonet@graffiti.com (Andrew Brown) that goes *ping*!"
werdna@squooshy.com * "information is power -- share the wealth."