Your application has no central run loop in which to loop and wait for notifications.
As an experiment, add a CFRunLoopRun()
call after your NSWorkspace call. CFRunLoopRun will loop until the process is terminated.
See Matt Gallagher's demystifying NSApplication by recreating it post to learn more about the run loop and the role it plays in keeping your application running and processing events.