Describe the functionality of each of the following system c

Describe the functionality of each of the following system calls: a. kill(456, 0); b. waitpid(-1, &status;, 0); c. raise(SIGUSR1);

Solution

a) Kill(pid, sig) first argument is Process Id of the process you want to kill and sig is signal you want to send.

Kill(456,0) : Kill Process 456 and no signal is sent.

b) The waitpid() system call suspends execution of the calling process until one of its children terminates.

c)raise(SIGUSR1): function raise() is used for sending a signal to the program that contains this raise() call. raise() can only send a signal to the program that contains it. SIGUSR1 is user defined signals.

 Describe the functionality of each of the following system calls: a. kill(456, 0); b. waitpid(-1, &status;, 0); c. raise(SIGUSR1);Solutiona) Kill(pid, sig)

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site