[GRASS5] G_done_msg(), stderr, and fileno()
Hamish
hamish_nospam at yahoo.com
Mon Oct 24 07:13:09 EDT 2005
Hi,
G_done_msg() does some figuring on where to send the output:
if (isatty(1))
out = stdout;
else if (isatty(2))
out = stderr;
for one thing, shouldn't that use fileno(stdout) instead of "1", and
for another shouldn't it try to send to stderr first? always?
G_message(), G_warning(), and G_fatal_error() all send exclusively to
stderr, with the bell getting a isatty(fileno(stderr)) test.
I've written a script which calls a module which uses G_done_msg().
I'd like to pipe the stdout to a file, but currently the output of
G_done_msg() is polluting matters.
?,
Hamish
More information about the grass-dev
mailing list