#include #include #include int main() { pid_t pid; printf("program started\n"); pid = fork(); if (pid < 0) { // error, fork failed printf("fork failed\n"); } else if (pid == 0) { // child process printf("this is the child\n"); } else { // parent process printf("this is the parent\n"); } printf("exiting\n"); return 0; }