1
  • Is it correct that a shell can send signals only to its jobs, but can't send signals to processes which are not its jobs?

  • disown moves a job out of the job list of a shell. Does that mean a disowned process will not receive all the signals (not just SIGHUP) from its parent shell? If it will still receives other signals, why so?

2 Answers 2

3

You can always send signals to any process you own. The shell presumably won't on it's own.

1
  • Thanks. I forgot to say I am only talking about signals sent from the parent shell. So the shell won't send any signal to a disowned process, not just SIGHUP? Commented Feb 28, 2016 at 23:28
1

Easy to test:

sleep will die if it receives SIGUSR1:

$ sleep 999 & [1] 7399 $ kill -USR1 7399 $ [1]+ User defined signal 1 sleep 999 

So let's disown it and see if it survives:

$ sleep 999 & [1] 7396 $ disown %1 $ jobs $ ps -fp 7396 UID PID PPID C STIME TTY TIME CMD schaller 7396 7360 0 19:59 pts/0 00:00:00 sleep 999 $ kill -USR1 7396 $ ps -fp 7396 UID PID PPID C STIME TTY TIME CMD $ 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.