[Qt-interest] Is it safe to fork() after an app.exec()
Will Rutherdale (rutherw)
rutherw at cisco.com
Mon Jun 1 23:58:52 CEST 2009
> -----Original Message-----
> From: qt-interest-bounces at trolltech.com
> [mailto:qt-interest-bounces at trolltech.com] On Behalf Of
> Thiago Macieira
> If you fork() and you have any sockets or files or other such
> resources
> open, you must make sure that only one of the two processes
> ever touches
> those resources.
>
> The easiest and best way to guarantee that is to get either
> the parent or
> the child process to call _exit(2). That is really with the
> underscore,
> not exit(3).
Thanks. I'll do that, along with the usual daemon setup steps.
-Will
More information about the Qt-interest-old
mailing list