What is a Unix signal, and how do you handle them?

Answer Posted / nashiinformaticssolutions

A signal in Unix is an asynchronous notification sent to a process to notify it of an event, such as an interrupt or termination request. Common signals include:
• SIGINT: Interrupt signal (usually sent by pressing Ctrl+C).
• SIGTERM: Termination signal, which can be caught and handled.
• SIGKILL: Forces a process to terminate immediately and cannot be caught.
Signals can be handled using signal handlers in shell scripts or programming languages like C.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain ‘system calls’ with respect to unix commands?

769


What is the pipe command?

800


What is the difference between grep and grep?

787


What is s and g in sed command?

784


What is updatedb?

758






How to find $ai_serual resolved path by using unix

1242


how to sort the content of the file based on numeric values

1496


What does the “echo” command do?

826


When i run a programm of orphan process. Instead of getting child's parent (ppid)=1 ..i get 1400 and it varies as per system. How can i findthe right soluion??? My pgm: #include # include int main() { int pid; pid=fork(); if(pid < 0) {exit(-1);} else if(pid==0) { printf("Child Process is Sleeping ..."); sleep(10); printf("Orphan Child's Parent ID : %u ",getppid()); } else { printf("Parent Process Completed ... %u ",getpid()); exit(0); } return 0; } Output:

1951


Is there a way to erase all files in the current directory, including all its sub-directories, using only one command?

1008


What is the difference between awk and grep?

783


What is the first character of the output in ls l command?

850


What is awk used for?

819


Why is awk called awk?

764


What does 'mkdir' command do in UNIX?

890