Thread View: gnu.g++.lib.bug
2 messages
2 total messages
Started by Martin Junius
Tue, 29 Dec 1992 17:03
libg++-2.3 strange bug
Author: Martin Junius
Date: Tue, 29 Dec 1992 17:03
Date: Tue, 29 Dec 1992 17:03
44 lines
2325 bytes
2325 bytes
Just noticed a strange bug when redirecting libg++ 2.3 iostream
output to a pipe: OUTPUT GETS LOST! This doesn't happen with
normal output or redirection to a file.
It also doesn't happen at all with libg++ 2.2.
----y.C-----------------------------------------------------------------------
#include <iostream.h>
main()
{
cerr << "Begin test\n";
cerr << "Blah\n";
cerr << "Blah bbbbbbbbbbbbbbb\n";
}
----Compile-------------------------------------------------------------------
Reading specs from /usr/global/lib/gcc-lib/sparc/2.3.3/specs
gcc version 2.3.3
/usr/global/lib/gcc-lib/sparc/2.3.3/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ -D__sparc -D__sun -D__unix y.C /usr/tmp/cca24756.i
GNU CPP version 2.3.3 (sparc)
/usr/global/lib/gcc-lib/sparc/2.3.3/cc1plus /usr/tmp/cca24756.i -quiet -dumpbase y.cc -version -o /usr/tmp/cca24756.s
GNU C++ version 2.3.3 (sparc) compiled by GNU C version 2.3.3.
as -o /usr/tmp/cca247561.o /usr/tmp/cca24756.s
/usr/global/lib/gcc-lib/sparc/2.3.3/ld -e start -dc -dp /lib/crt0.o -L/usr/global/lib/gcc-lib/sparc/2.3.3 -L/usr/global/lib /usr/tmp/cca247561.o -lg++ -lgcc -lc -lgcc
----Normal output-------------------------------------------------------------
# a.out
Begin test
Blah
Blah bbbbbbbbbbbbbbb
----Redirected output---------------------------------------------------------
# a.out 2>&1 | cat
Begin test
------------------------------------------------------------------------------
Everything after the first line is lost. I'll have a look at it,
just trying to figure out how to debug such a thing. ;-)
Martin
--
_____ _____
| |___ | Martin Junius FIDO: 2:242/6.1
| | | | | | Communication Networks Internet: mj@dfv.rwth-aachen.de
|_|_|_|@work| Aachen U of Technology Phone: ++49-241-8790220 (voice)
Re: libg++-2.3 strange bug
Author: bothner
Date: Wed, 30 Dec 1992 10:50
Date: Wed, 30 Dec 1992 10:50
14 lines
982 bytes
982 bytes
> Just noticed a strange bug when redirecting libg++ 2.3 iostream > output to a pipe: OUTPUT GETS LOST! The problem is the fseek in stdiobuf::sync() (in stdiostream.C). I'm not sure what the right fix is. One possibility is to just remove the call. That isn't quite right, but it may be close enough. Another possibilty is to do the fseek(), but ignore the result. > just trying to figure out how to debug such a thing. ;-) I did it by using a named pipe. --Per Bothner Cygnus Support bothner@cygnus.com
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads