I have an app running in OS X that needs to launch another executable with a GUI and then close itself leaving this other GUI intact.
Right now I'm launching the other executable with fork then execve and closing the app that launched it but the new executable keeps the menu bar from the app that just closed. This stops me from running the original app until I close the window for the executable.
The only thing I've found is people saying to use nohup but from what I understand that just stops the program from closing when the parent closes?
EDIT: After looking into the functions in the first answer, I realized I should have included some more details. I am using OS X 10.8 which seems to have deprecated a lot of the File Manager API. Another important detail is that I need to pass command line arguments to the executable.
The Cocoa way would be -[NSWorkspace launchApplication:]. At a slightly lower level, but still way above BSD, there's LSOpenApplication.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With