[Ecls-list] stdout stream pollution on libc errors

Matthew Mondor mm_lists at pulsar-zone.net
Fri Feb 11 11:34:51 UTC 2011


Hello,

I noticed in an application that I would find spurious error messages
in my stdout stream (which was redirected to a log file).  I think that
the source might be in src/c/error.d::FElibc_error() where indeed the
strerror(3) provided buffer is both printed on stdout and then included
in the sent signal.

Since the signal holds the error already, and that user code can then
print it, and since the debugger would also print it to an interactive
user on the debugger stream, it's probably not necessary to print the
error there.  If for another reason it should be printed, stderr would
probably be a better choice anyway, so I suspect it's a remnant of
earlier debugging code which was forgot there afterwards.

ecl_internal_error() on the other hand seems alright to me.

I also think that it would be best if the condition signaled in
FElibc_error() also included the errno value which would have use to
signal handlers, not only the string representation.

Thanks,
-- 
Matt




More information about the ecl-devel mailing list