Skip to content

Instantly share code, notes, and snippets.

@sposterkil
Created March 21, 2015 21:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sposterkil/99bfa85e0e11f48c98d6 to your computer and use it in GitHub Desktop.
Save sposterkil/99bfa85e0e11f48c98d6 to your computer and use it in GitHub Desktop.
Replaced it with this
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