MCQ Practice
What is the output of this program? #include #include #include void response (int); void response (int sig_no) { printf("%sn",sys_siglist[sig_no]); printf("This is singal handlern"); } int main() { pid_t child; int status; child = fork(); switch (child){ case -1 : perror("fork"); exit (1); case 0 : kill(getppid(),SIGKILL); printf("I am an orphan process because my parent has been killed by men"); printf("Handler failedn"); break; default : signal(SIGKILL,response); wait(&status); printf("The parent process is still aliven"); break; } return 0; }
Subject: Computer Science EngineeringTopic: Linux
Correct Answer: A
