C – fork(), sleep(), and pipe(int *fd) in Mac OS X

fork(), sleep(), and pipe(int *fd) in Mac OS X… here is a solution to the problem.

fork(), sleep(), and pipe(int *fd) in Mac OS X

I’m taking a class called “Operating System” and we’re learning about these features. I have a Mac and I want to know if these features will work on my Mac or if I have to install linux. What Linux distribution should I install if I can’t do this on my Mac? (Too much, don’t know which one to take).

Solution

The prototype of pipe() is wrong, but all three functions are part of POSIX. Because OS X is a POSIX operating system, it supports all three. Note that you will need to install Apple’s developer tools to access things like compilers and appropriate headers in order to build software that uses them.

Related Problems and Solutions