// // Written for Computer Networks and Systems lab classes // AUTHOR : Sergiusz Warga #include #include #include #include void child_task() { execl("/usr/bin/cal", "cal", "2021", NULL); } int main() { pid_t pid; int status; pid = fork(); if (pid == -1) { // If something went wrong. perror("Fork: "); exit(EXIT_FAILURE); } if (pid == 0) { // If this is a child process. child_task(); exit(EXIT_SUCCESS); } wait(&status); return 0; }