What are signals in LINUX/UNIX? Give three examples of signals. What are the possible actions that a process can take upon receiving a signal? Write commands for sending these signals to a process with PID 10289.

What will be an ideal response?


Signals are software interrupts (events) that can be sent to processes. Some of the possible signals that can be sent to a LINUX/UNIX process are: keyboard interrupt (this is sent when the user presses ), a child process terminates, a user uses the kill command to terminate a process, and a user logs off. Upon receiving a signal, a process can take one of the three actions: take the system defined default action, ignore the signal, and take an action as specified in the program code.
The following commands can be used to send the above signals to the process with PID 10289. The number with the negative sign is the signal number corresponding to the given signal. Thus the signal number for the keyboard interrupt is 2, for software interrupt is 15, and for user logging off (the hangup singnal) is 1.
kill -2 10289
kill -15 10289
kill -1 10289

Computer Science & Information Technology

You might also like to view...

Which of the following is not a Java keyword?

a. do b. next c. while d. for

Computer Science & Information Technology

Medical offices keep recorded notes of the patients' office visit called HEALTH notes.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

?The why, who, what, when, and how of communications are important questions that one must answer before he or she communicates.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

When zooming in on the event time line, a new search is run.

a. true b. false

Computer Science & Information Technology