I know that it might come as a stupid question but could anyone help me understand the behavior of the following code snippet
//label 0 int main(){ fork();
The process tree looks like below. I used following naming convention for processes. prefix parent process name to the corresponding fork label that created it.
[0] / | \ [01] [02] [03] / \ | [012] [013] [023] / [0123]
Like @Mat said, 8 processes are created.