Fix Popen not always returning error code
`Process#waitpid` returns `Process::Status`, which holds a 16-bit value. * The higher-order 8 bits hold the exit() code (`exitstatus`). * The lower-order bits holds whether the process was terminated. Previously if the process didn't exit normally, `Gitlab::Popen#popen` would return a status of `nil` since `exitstatus` would be `nil`. This isn't informative because we want to know what signal killed the process. We can get this by calling `Process::Status.to_i`. Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/351155 Changelog: fixed
Showing
Please register or sign in to comment