In the C Standard Library, signal processing defines how a program handles various signals while it executes. A signal can report some exceptional behavior within the program (such as division by...

1 answer below »













In

the C

Standard

Library,

signal

processing

defines

how

a

program

handles



various signals while it executes. A signal can report some exceptional behavior



within

the

program (such

as division

by

zero),

or

a

signal

can

report

some



asynchronous event outside the program (such as someone striking an interactive



attention key on a keyboard).



Libraries to be included:



#include



#include



#include



#include



#include



In this assignment, you will

are

to write a C code that

causes/
invokes/triggers the


appropriate signals in the following scenarios:



1.


Segmentation fault

- invalid memory access


2.


Interrupt -

interactive attention request sent to the program.


3.


Abort


4.


Interrupt a program running in one terminal from another terminal using

kill


command (hint: use

pause ()
)


Make sure to use a

signal handler

to handle the signals.



Example
: Arithmetic expression exception triggers

SIGFPE

signal.



What needs to be submitted?



1.


Individual

C

code

file

for

each

scenario.

(Name

of

the

file

should

be


lastname_firstname_scenarioNumber.c
)


2.


Individual

screenshot

for

each

scenario.

(Name

of

the

file

should

be


lastname_firstname_scenarioNumber
)


Due date:




09.28.22



In

the C

Standard

Library,

signal

processing

defines

how

a

program

handles



various signals while it executes. A signal can report some exceptional behavior



within

the

program (such

as division

by

zero),

or

a

signal

can

report

some



asynchronous event outside the program (such as someone striking an interactive



attention key on a keyboard).



Libraries to be included:



#include



#include



#include



#include



#include



In this assignment, you will

are

to write a C code that

causes/
invokes/triggers the


appropriate signals in the following scenarios:



1.


Segmentation fault

- invalid memory access


2.


Interrupt -

interactive attention request sent to the program.


3.


Abort


4.


Interrupt a program running in one terminal from another terminal using

kill


command (hint: use

pause ()
)


Make sure to use a

signal handler

to handle the signals.



Example
: Arithmetic expression exception triggers

SIGFPE

signal.



What needs to be submitted?



1.


Individual

C

code

file

for

each

scenario.

(Name

of

the

file

should

be


lastname_firstname_scenarioNumber.c
)


2.


Individual

screenshot

for

each

scenario.

(Name

of

the

file

should

be


lastname_firstname_scenarioNumber
)


Due date:




09.28.22 11:59pm
11:59pm
In



the C

Standard

Library,

signal

processing

defines

how

a

program

handles



various signals while it executes. A signal can report some exceptional behavior



within

the

program (such

as division

by

zero),

or

a

signal

can

report

some



asynchronous event outside the program (such as someone striking an interactive



attention key on a keyboard).



Libraries to be included:



#include



#include



#include



#include



#include



In this assignment, you will

are

to write a C code that

causes/
invokes/triggers the


appropriate signals in the following scenarios:



1.


Segmentation fault

- invalid memory access


2.


Interrupt -

interactive attention request sent to the program.


3.


Abort


4.


Interrupt a program running in one terminal from another terminal using

kill


command (hint: use

pause ()
)


Make sure to use a

signal handler

to handle the signals.



Example
: Arithmetic expression exception triggers

SIGFPE

signal.



What needs to be submitted?



1.


Individual

C

code

file

for

each

scenario.

(Name

of

the

file

should

be


lastname_firstname_scenarioNumber.c
)


2.


Individual

screenshot

for

each

scenario.

(Name

of

the

file

should

be


lastname_firstname_scenarioNumber
)


Due date:



09.28.22 11:59pm
Answered Same DaySep 29, 2022

Answer To: In the C Standard Library, signal processing defines how a program handles various signals while it...

Nidhi answered on Sep 29 2022
58 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here