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...

A menu command with a small arrow to the right indicates that a ________ will display

A) pop-up menu B) submenu C) toggle menu D) shortcut menu

Computer Science & Information Technology

You can encrypt someone else's files for a different user

Indicate whether the statement is true or false

Computer Science & Information Technology