Catch Errno::EPERM when attempting to kill process
What does this Merge Request do and why?
This MR fixes an issue when running gdk stop
, some services response from the kill
command with a Errno::EPERM
exception which according to https://ruby-doc.org/core-2.4.1/Process.html#method-c-kill means:
If signal is an integer but wrong for signal, Errno::EINVAL or RangeError will be raised. Otherwise unless signal is a String or a Symbol, and a known signal name, ArgumentError will be raised.
Also, Errno::ESRCH or RangeError for invalid pid, Errno::EPERM when failed because of no privilege, will be raised. In these cases, signals may have been sent to preceding processes.
Merge Request checklist
-
This change is backward compatible. If not, please include steps to communicate to our users. -
Tests added for new functionality. If not, please raise Issue to follow-up. -
Documentation added/updated, if needed. -
gdk doctor
test added, if needed. -
Add the ~highlight
label if this MR should be included in theCHANGELOG.md
.
Closes #1267 (closed)