Re: Gtkmm and fork()



On Sun, 11 Apr 2010 03:45:08 -0700 (PDT)
"Adam Chyla [PL]" <adam chyla gmail com> wrote:
> So, Could you give me a  simple example showing how to use new thread
> and fork()?

It would be best to know what you are trying to do in the child
process.  Depending on that, I think the alternative approach offered to
you may well be the better one.  Your mistake in your second go at it
was not to end the child process when you want it to end.  Every child
process after a fork() must end with either a call to exec() (which
replaces the process image with that of an entirely new program) or
_exit() (not exit()) which terminates the process entirely.

Chris




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]