[SunHELP] stream problem in Solaris 8

sunhelp at sunhelp.org sunhelp at sunhelp.org
Wed Jun 6 19:43:33 CDT 2001


Hi, all

I have a problem when I use stream in multithread environment.
The code lists below.

//Source file name is streamtest.cpp
#include <strstream.h>   // or #include<strstream>
using namespace std;

int main()
{
    strstream a_stream;
    return 0;
}

compile and link whih this command:
CC -o streantest streamtest.cpp -mt

When I run the program , it blocks in the strstream's constructor.

Remove the '-mt' option, it runs well.
Running it in Solaris 2.6, it works well too.





More information about the SunHELP mailing list