Example code showing use of Linux / Unix API's on OS X Also built commandline program
Download the release and unzip. Inside the cmake-build-release/ folder is an already built executable, osx_process.
Simply open a terminal into that directory and enter:
$ ./osx_process