Boost logo

Boost Users :

Subject: Re: [Boost-users] pthread_exit() from boost::thread segfaults ?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-12-30 10:24:41


AMDG

On 12/20/2010 8:27 AM, Viatcheslav.Sysoltsev_at_[hidden] wrote:
> does anybody have an idea why the following simple programm segfaults:
>
>
> #include <boost/thread.hpp>
>
> void tf()
> {
> pthread_exit(NULL);
> }
>
>
> int main()
> {
> boost::thread t(tf);
> t.join();
> return 0;
> }

Don't use pthread_exit. It doesn't clean up
the thread's stack properly.

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net