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()向进程发送SIGKILL信号
kill():
Same as terminate() but using the SIGKILL signal on Unix.
terminate()
向进程发送SIGTERM
信号kill()
向进程发送SIGKILL
信号进程如何处理这些信号取决于它。通常,
SIGTERM
是优雅的关闭,而SIGKILL
更像是中止More details相关问题 更多 >
编程相关推荐