I read about signals and I know how to send a signal to a process from the command line. Just do
ps -C executable
to know the pid of the process, and then
kill -s signal pid(number)
However, I'd like to find a more interactive and general way to do this if possible.
I'd like to send a signal to a specific process from the command line. I'd like to not need to print the PID of the process I want to signal, but rather use a way that the code understands which process should be signaled.
Other than that I'd like to understand exacly what the kill command does.
- Does it kill the process that signals?
- Does it kill the process where it's called?
- If it kills a process it means that it's similar to do
exit(0)
, or does the process resume after the signal is sent back?