Boost logo

Boost Users :

From: William E. Kempf (wekempf_at_[hidden])
Date: 2003-06-26 12:57:46


Pavol Droba said:
> Hi,
>
> I have problem with boost.threads on linux ( under gcc ).
> I have a multithreaded aplication using Boost.Thread. It works just
> fine.
>
> However, I want to make a daemon out of it. So I tried to fork() at the
> start of the program and run all the relevant code ( including all
> threading ) in the child process. But when I do so, first call to
> create_thread hangs the process.
>
> I'm quite new to linux threading, so it is possible, that the problem is
> not related to Boost.Threads.

Several comments:

1) I'm not a POSIX/Linux developer either.

2) Since fork is non-standard and not part of Boost.Threads, you're
technically in undefined territory as far as Boost.Threads is concerned.

3) Since Boost.Threads should play nice here, despite what I just said in
(2), if there is a problem (see 1) it should be fixed. If anyone can
shed light on this (and maybe even a patch), it would be appreciated.
Other wise, I'll add this to my todo list, though it will be scored low.

-- 
William E. Kempf

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