question 1
#include #include #include #include <sys/types.h> #include <sys/wait.h> int main(int argc, char *argv[]) { // (d) Check for correct number of arguments if (argc != 3) { fprintf(stderr, “Usage: %s \n”, argv[0]); exit(1); } // (i) Print from the parent process printf(“Parent Process ID: %d\n”, getpid()); printf(“Parent’s Parent Process ID: %d\n”, getppid()); printf(“Parent Process Group ID: …