Timeline for answer to What is the function of "kill -1 -9" command? by steeldriver
Current License: CC BY-SA 3.0
Post Revisions
11 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 19, 2020 at 13:35 | comment | added | ehpc |
@steeldriver Actually -9 as PID is not a PID but a PGID (process group id). So kill -1 -9 sends SIGHUP to all processes in group 9.
|
|
| Jan 13, 2018 at 20:11 | comment | added | Tobi Obadiah |
@steeldriver No such process. because there is no process with id 9. But try an actual process id in its place.
|
|
| Jan 13, 2018 at 20:09 | comment | added | steeldriver |
@T.Obadiah I did try it - I even posted the result in my answer (-bash: kill: (-9) - No such process). What "real question" are you referring to?
|
|
| Jan 13, 2018 at 20:06 | comment | added | Tobi Obadiah |
@steeldriver In the real question the -9 is a command-line argument and 9 is the PID try it. it works. -1 is not negative 1 but an argument 1 ( signal ).
|
|
| Jan 13, 2018 at 16:20 | vote | accept | coding_ninza | ||
| Jan 13, 2018 at 16:20 | comment | added | coding_ninza | oh, ok I guess that command was written incorrectly on the cheat sheet. | |
| Jan 13, 2018 at 15:59 | comment | added | steeldriver |
@coding_ninza no they are not: the first one (attempts to) send signal 1 to a process whose PID is -9 (which is not a valid PID) whereas the second sends signal 9 to all process except itself and the init process, as explained in the manual page.
|
|
| Jan 13, 2018 at 15:55 | comment | added | coding_ninza | Is " -1 -9 " and " -9 -1 " in kill command both are same or not? | |
| Jan 13, 2018 at 15:48 | history | edited | steeldriver | CC BY-SA 3.0 |
made error in OP's command more explicit
|
| Jan 13, 2018 at 15:46 | comment | added | coding_ninza | I think that the writer is wrong because I wrote the command as it is written on the cheat sheet. | |
| Jan 13, 2018 at 14:21 | history | answered | steeldriver | CC BY-SA 3.0 |