test.cpp - #include #include #include #include #include...

This preview shows page 1 out of 1 page.

#include <unistd.h>#include <stdlib.h>#include <stdio.h>#include <iostream>#include <sys/types.h>#include <sys/wait.h>using namespace std;int main(){pid_t pid;int* status;pid = fork();if (pid > 0){cout << "Parent :child executing" <<endl;pid_t cpid=wait(status);
End of preview. Want to read the entire page?

Upload your study docs or become a

Course Hero member to access this document

Term
Spring
Professor
murphy
Tags
Operating Systems, endl, Exit, pid t pid, cpid wait status

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture