Created
March 21, 2015 21:15
-
-
Save sposterkil/99bfa85e0e11f48c98d6 to your computer and use it in GitHub Desktop.
Replaced it with this
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (int i = 0; i < 10; ++i) { | |
if (getpid() == master_pid) { | |
if (fork()) { | |
westbound_car(); | |
} | |
else if (fork()) { | |
eastbound_car(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment