fork Cocoa process and re-init Cocoa. how?
问题 I tried to fork() a Cocoa process and setup a new Cocoa/ObjC environment but I get the error: The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec(). Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug. Is there a way to re-initialize Cocoa/ObjC in the forked process? I know that the documentation about fork() does say it is limited, however I wonder if there is still a way to do it,