What is the difference between Process.terminate()
and Process.kill()
in Python multiprocessing?
Asked
Active
Viewed 2,118 times
0

wyz23x2
- 298
- 4
- 16
-
Did you read the documentation? What part of it is unclear to you? – MisterMiyagi May 08 '20 at 13:04
1 Answers
6
terminate()
sends the SIGTERM
signal to the process
terminate():
Terminate the process. On Unix this is done using the SIGTERM signal; on Windows TerminateProcess() is used. Note that exit handlers and finally clauses, etc., will not be executed.
kill()
sends the SIGKILL
signal to the process.
kill():
Same as terminate() but using the SIGKILL signal on Unix.
How the process handles these signals is up to it. Usually, SIGTERM
is graceful shutdown while SIGKILL
is more of an abort. More details

rdas
- 20,604
- 6
- 33
- 46
-
Does this answer your question? https://stackoverflow.com/questions/19206124/difference-between-killed-and-terminated – Roy May 08 '20 at 13:04