-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support "superkill" with kill
shell builtin
#77
Comments
__superkill requires that a SIGKILL be sent to the process at least 3 seconds prior. If it has not been sent, it will issue an error:
I'm not a big fan of this behaviour personally. I'd rather it attempt to send a SIGKILL, check if the process still exists for 3 seconds, and then send a __superkill if it still exists. |
Another option is to keep -K the same (useful if you tried sending the sigkill manually), but introduce a -K2 (which attempts a sigkill and then a superkill as described above). Or I could improve the logic by attempting a superkill first, and if it fails due to EINVAL/JRSigkillNotSent, then perform the kill/superkill combo. |
After some internal discussion, I've come to the conclusion that we should mirror the existing behavior of |
I was debugging a problem with a filesystem where
df
was hanging. When I tried to kill the process, I discovered thatkill -9
wasn't sufficient to terminate the process. I had to resort to superkill (kill -K
) to terminate it. The problem that I encountered is thatbash
treatskill
as a shell builtin, and it refuses the-K
argument as an invalid signal. I had to call/bin/kill -K
to actually issue the signal.Would it be possible to add a patch to
bash
so that the shell builtin is able to handle this signal? There is a __superkill() API that could be used in this case.The text was updated successfully, but these errors were encountered: