hi, it is only an exercise,
how many processes are there in 30 seconds?
I think 30x9 processes?
It is impossible to count trying the code.
Code:
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include "/home/blob/Documenti/SO/err.h"
int main(void)
{
int i = 0;
int fd[2];
pid_t pid0, pid1, pid2, pid3, pid4, pid5;
pid_t pid6, pid7, pid8, pid9;
pid0 = fork();
pid1 = fork();
pid2 = fork();
pid3 = fork();
pid4 = fork();
pid5 = fork();
pid6 = fork();
pid7 = fork();
pid8 = fork();
pid9 = fork();
printf("hello\n");
sleep(30);
exit(0);
}