c program the catches the ctrl-c(SIGINT) Signal for the
first time and prints a output rather and exit on pressing
Ctrl-C again
Answers were Sorted based on User's Feedback
Answer / rakesh
#include <stdio.h>
#include <signal.h>
void sigproc(void);
main()
{
signal(SIGINT, sigproc);
printf("This program catches ctrl-c(SIGINT) signal for
first time and exit on pressing ctrl-c again\n");
for(;;);
/* infinite loop */
}
void sigproc()
{
signal(SIGINT, sigproc);
printf("you have pressed ctrl-c \n");
(void) signal(SIGINT,SIG_DFL);
}
Is This Answer Correct ? | 0 Yes | 0 No |
how to print the 2-d, 3-d arrays in unix shell script programs please answer thi questio to my mail venusaikumar@gmail.com
What is the first line in every perl script called?
What is k shell?
What are the advantages of shell script?
Is shell scripting a language?
How do I set bash as default shell mac?
In which variable prompt value is stored?
what is the difference between cmp and diff commands
Why do we use shell scripting?
What is a batch file used for?
What does egrep mean?
Write a command sequence to find the count of each word?