x-files must die: generate *config.h from the Makefile, etc
Raja R Harinath
harinath@cs.umn.edu
Thu Mar 22 15:38:00 GMT 2001
Graham Stott <grahams@redhat.com> writes:
> "Kaveh R. Ghazi" wrote:
[sni[]
> > exec >& /dev/null
> >
> > Does that help?
>
> Yes that eliminates the messages.
>
> > > What system is this, and can you trace mv or rm and see which system
> > > call is failing?
> > > zw
> Standard RH 7.0 using "GNU bash, version 2.04.11(1)-release (i386-redhat-linux-gnu)"
The messages may have been eliminated because stderr has been
redirected to /dev/null.
I think the portable shell way is to:
# somewhere at the top, copy stdout into some unused FD
# to be safe, assume shells cannot handle 2-digit FDs
exec 9>&1
# open output file
exec 1> /foo/bar
# ...
# done with output file, close by restoring stdout
exec 1>&9
- Hari
--
Raja R Harinath ------------------------------ harinath@cs.umn.edu
"When all else fails, read the instructions." -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing." -- Roy L Ash
More information about the Gcc-patches
mailing list