Creation Date: May 8, 1998
Keywords: Solaris, HP-UX, NSTask, fork
Q: Why won't NSTasks run under Solaris?
A: On Solaris, the fork() command is used only in non-threaded contexts; fork1() is used for multithreaded applications. Because Apple's implementation of NSTask in WebObjects release 3.5.1 does not conform to this usage, you will not be able to use NSTasks on the Solaris platform. Instead, you will have to use fork1() and exec() to manually spawn a process.
This code example shows how an external task might be set up to run with fork and exec for Solaris and HP-UX systems, and with NSTask for other OpenStep platforms.