#include #include #include int main(int argc, char *argv[]) { pid_t pid; pid = fork(); if (pid == 0) { printf("Hello from the child process!\n"); printf("The child is exiting now.\n"); } else if (pid > 0) { printf("Hello from the parent, pid %d.\n", getpid()); printf("The parent has forked process %d.\n", pid); sleep(60); printf("The parent is exiting now.\n"); } else { printf("There was an error with forking.\n"); } return 0; }