#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(void) {
pid_t pid = fork();
if (pid == -1) {
perror("fork");
exit(EXIT_FAILURE);
}
if (pid == 0) {
printf("child process - %d\n", getpid());
} else {
printf("parent process - %d\n", getpid());
}
exit(EXIT_SUCCESS);
}
/*
run
parent process - 19
child process - 20
*/