Timeline for Difference Between bg and kill -CONT
Current License: CC BY-SA 4.0
3 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Sep 27, 2018 at 22:03 | comment | added | Chris Davies |
@joker oh I see what you mean. Yes, the %n is a jobspec, which as answered very nicely by mosvy is a process group corresponding to the command/pipeline that's been suspended with Ctrl/Z. You can use kill to send signals to a process group by treating it as a negative value - so in my example above the kill -CONT %1 was equivalent to kill -CONT -2004.
|
|
| Sep 26, 2018 at 21:08 | comment | added | joker |
I tried your example, and you are correct when you refer to the process using %<JOBSPEC> with bg and/or kill -CONT. However, when I try kill with referring to the process by its ID, things don't work. I have run the experiments in two scripts files (you can run them using script) but not sure how to share them with you.
|
|
| Sep 26, 2018 at 14:38 | history | answered | Chris Davies | CC BY-SA 4.0 |