You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we discussed the kill command we talked about that it should really kill (trying first SIGTERM and if it doesn't die then calling SIGKILL).
The problem is that it's not calling SIGKILL if process doesn't dies:
@tiago4orion I think we can sleep a few milliseconds before testing if pid is alive with err = syscall.Kill(pid, 0) finally checking if err isn't ESRCH to kill it once and for all.
When we discussed the
kill
command we talked about that it should really kill (trying first SIGTERM and if it doesn't die then calling SIGKILL).The problem is that it's not calling SIGKILL if process doesn't dies:
The problem is that kill(2) returns 0 (ok) when it sends the signal successfully to the process, but that doesn't guarantees that it will die with SIGTERM...
See code here: https://github.com/c0defellas/enzo/blob/master/cmd/kill/kill_unix.go#L13
The right approach would be verify if process is still alive in the next few milliseconds and if so then send a SIGKILL.
The text was updated successfully, but these errors were encountered: