Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

c

linux

fork

macos

I am taking a class called 'Operating Systems' and we are learning about these functions. I have a Mac and i want to know if these function work on Mac, or do I have to install linux. If I can't do this on Mac, what linux distribution should I install? (There's so many, I don't know which one to get).

like image 753
user635064 Avatar asked Oct 12 '25 08:10

user635064


1 Answers

Your prototype for pipe() is wrong, but all three functions are part of POSIX. Since OS X is a POSIX operating system, it supports all three. Note that you will need to install Apple's developer tools in order to have access to a compiler and the appropriate headers and such in order to build software that uses them.

like image 72
Ignacio Vazquez-Abrams Avatar answered Oct 14 '25 08:10

Ignacio Vazquez-Abrams