[7200] in Athena Bugs
vax 7.2R: csh eval
daemon@ATHENA.MIT.EDU (daemon@ATHENA.MIT.EDU)
Wed Feb 27 17:27:09 1991
From: brlewis@ATHENA.MIT.EDU
Date: Wed, 27 Feb 91 17:27:01 -0500
To: kkkken@ATHENA.MIT.EDU
In-Reply-To: [7199]
Cc: bugs@ATHENA.MIT.EDU, jefft@ATHENA.MIT.EDU, acevedo@ATHENA.MIT.EDU
In-Reply-To: kkkken@ATHENA.MIT.EDU's message of Wed, 27 Feb 91 16:32:20 -0500 <9102272132.AA02319@salamander.MIT.EDU>
Thanks for your input, Ken. Your response solves the problem that
motivated the bug report. I will, however, maintain that this is a bug
in csh.
>This is exactly what I'd expect. The output of "eval" is sent to
>"/dev/null". The output of "echo" is sent to stdout, as it should be.
Here's an example that does exactly the opposite:
athena% time echo foo > /dev/null
0.0u 0.0s 0:00 200% 92+113k 0+0io 0pf+0w
So csh is inconsistent even among shell builtins. It ought to evaluate
all shell builtins the same way as much as possible. Also, it ought to
make the evaluation of shell builtins as much like the evaluation of
other commands as possible.
Suppose I wrote my own eval program, beval, trying to duplicate the eval
builtin. Suppose I then typed:
beval echo foo > /dev/null
The shell would redirect stdout to /dev/null and execute beval, which
would in turn execute echo, which would inherit stdout from beval. I
think the same thing ought to happen with eval.
Bruce