[Solved] C program in Linux to implement below functionalities

25 $

File Name: C_program_in_Linux_to_implement_below_functionalities.zip
File Size: 499.26 KB

SKU: [Solved] C program in Linux to implement below functionalities Category: Tag:
5/5 - (1 vote)

5/5 – (1 vote)

Write a C program in Linux to implement the following functionalities

Declare a global variable usr_interrupt=1

Write a signal handler function

void reset_signalvaluezero ()

When a SIGALRM signal arrives this function will be called in which variable will be set

sig_atomic_t usr_interrupt = 0;

Write a signal handler function

void Increment_signalvalue ()

When a SIGINT signal arrives this function will be called in which variable will be incremented theusr_interrupt by 1.

Write a main function

int main (void)

Handle two Signals SIGALRM and SIGINT.

Set the alarm for 10 sec

Parent process will sit in tight loop by keeping check on usr_interrupt variable once this variable will be 5 parent process will print some ENDING message and will exit.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] C program in Linux to implement below functionalities
25 $