When I fork()
in a Qt application, what parts of Qt behave sane? Does Qt support this?
Obviously, e.g. the GUI on MacOSX will not work because Cocoa itself does not support forked processes.
But there are many other parts, e.g. the list of threads, etc.
QCoreApplication::applicationPid()
seems to return the wrong value. (According to here.)
Or to put the question a bit different: I must fork()
in my app and there are certain parts which might access Qt in the child process. Where do I need to take extra care, despite all the Qt GUI stuff?