Can somone please explain to me what does fork() != 0 mean? From what I understand I think it means if fork is not false? Or if fork is true then.... I dont understand how Fork() can be true or false, seeing that it just creates a copy of a process into a parent and child.
1 #include "csapp.h"
2
3 int main()
4 {
5 int x = 3;
6
7 if (Fork() != 0)
8 printf("x=%d\n", ++x);
9
10 printf("x=%d\n", --x);
11 exit(0);
12 }
EDIT: Also if a program where to say "if (Fork() == 0)" what would that mean?