We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following code from the .pdf version:
#include <stdio.h> #include <ctype.h> #include <limits.h> #include <string.h> #include <stdlib.h> #include <unistd.h> void try() { fork(); printf("Example\n"); fork(); return; } int main() { try(); fork(); printf("Example\n"); exit(0); }
Try: https://www.programiz.com/c-programming/online-compiler/
Generates 10 lines of "example" the same when I hand ran it. (not the 8 suggested here: https://github.com/DreamAndDead/CSAPP-3e-Solutions/blob/master/chapter8/8.12.md)
solution: 1 * fork -> 2 * "example\n" + 2 * fork -> 4 * fork -> 8 * "example\n". = 10 * "example\n"
It seems that the solutions are from the 2nd edition and not the 3rd.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The following code from the .pdf version:
Try: https://www.programiz.com/c-programming/online-compiler/
Generates 10 lines of "example" the same when I hand ran it.
(not the 8 suggested here: https://github.com/DreamAndDead/CSAPP-3e-Solutions/blob/master/chapter8/8.12.md)
solution:
1 * fork -> 2 * "example\n" + 2 * fork -> 4 * fork -> 8 * "example\n".
= 10 * "example\n"
It seems that the solutions are from the 2nd edition and not the 3rd.
The text was updated successfully, but these errors were encountered: