the signal receives a SIGTSTP (Ctl-Z), it should print the number of signals SIGINT he received. after having received 3 SIGINT's, the program must “invite” the user to exit (“Really exit (Y/n)?”). If the

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter13: Internet And Distributed Application Services
Section: Chapter Questions
Problem 5VE
icon
Related questions
Question

Build the C program from the main routine described below:

int main(int argc, char* argv[])

{

while(1)

return 0;

}

The program must count how many times the user

sends the SIGINT signal to the process in

execution. When the signal receives a SIGTSTP

(Ctl-Z), it should print the number of signals

SIGINT he received. after having received

3 SIGINT's, the program must “invite” the

user to exit (“Really exit (Y/n)?”). If the

user does not respond within 20 sec., the program

ends alone.­­­­­­­­ 

Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
InputStream
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning