Which one of the following is not true about this program?
#include<stdio.h>
#include<signal.h>
void response (int);
void response (int signo)
{
printf("%s\n",sys_siglist[signo]);
signal(SIGSEGV,SIG_IGN);
}
int main()
{
signal (SIGSEGV,response);
char *str;
*str = 10;
return 0;
}
#include<stdio.h>
#include<signal.h>
void response (int);
void response (int signo)
{
printf("%s\n",sys_siglist[signo]);
signal(SIGSEGV,SIG_IGN);
}
int main()
{
signal (SIGSEGV,response);
char *str;
*str = 10;
return 0;
}
A. kernel sends SIGSEGV signal to a process as segmentation fault occurs
B. in this process signal handler will execute only one time of recieving the signal SIGSEGV
C. all of the mentioned
D. none of the mentioned
Answer: Option D
Related Questions on Linux
What command is used to count the total number of lines, words, and characters contained in a file?
A. countw
B. wcount
C. wc
D. count p
E. None of the above
What command is used with vi editor to delete a single character?
A. x
B. y
C. a
D. z
E. None of the above
Join The Discussion