[SOLVED] CECS326 Homework 5  

30.00 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

5/5 - (1 vote)

Chapter 4 Lecture slides (On signals).

Purpose: This assignment is to gain experience with signals. A) Signal Handling:

Begin with a copy the following starter programs: /net/326/signal.c

In this program, after 6 seconds, an alarm goes off and the program terminates.

Add a procedure and the associated signal handling, so that when the alarm goes off the message “Ring Ring” is printed to the screen and the program continues.

When you test your program also try the control-C to make sure the “Got signal” is still working. B) Sigaction:

Make a copy of your signal.c from Part A after you complete it.

Modify it to use sigaction instead of the traditional signal function.

It should functionally remain the same.

Demo: Your Part A signal program. You do not need to demo or submit part B, but questions related to it may be asked on exams.

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.