[631] in Pthreads mailing list archive

home help back first fref pref prev next nref lref last post

Possibly bug in libpthread and C++ ?

daemon@ATHENA.MIT.EDU (Alex Fenyo (eowyn))
Mon Apr 14 17:29:24 1997

Date: Mon, 14 Apr 1997 23:15:16 +0200 (MET DST)
From: "Alex Fenyo (eowyn)" <fenyo@email.enst.fr>
To: pthreads@MIT.EDU
Cc: proven@MIT.EDU
Reply-To: fenyo@email.enst.fr


Hello,

I'm trying to use Chris Provenzano's pthreads implementation on FreeBSD
and I encounter a strange behavior with C++ :

The following very simple program :
------------------------------------------------------------
#include <stdio.h>
#include <unistd.h>
#include <g++/iostream.h>

main()
{
  cerr <<  "LINE1\n";
  write(1, "LINE2\n", 6);
  cout <<  "LINE3\n";
}
------------------------------------------------------------
doesn't work correctly when linked with libpthread.a and works correctly
without libpthread.a.

With libpthread, it writes :
me@myhost> pg++ -o test test.cc
me@myhost> ./test
LINE2
me@myhost>

Without libpthread, it writes :
me@myhost> g++ -o test test.cc
me@myhost> ./test
LINE1
LINE2
LINE3
me@myhost>

I tried this test on FreeBSD-2.0 and FreeBSD-3.0-current (I had
to make very little modifications in include files to compile
libpthread on FreeBSD-3.0-current), and the problem is the same.

Could you please help me,

Many thanks,
Alexandre Fenyo



home help back first fref pref prev next nref lref last post