Fix abnormal exit detection on macOS
I made an oopsie with #7705 and omitted the check entirely on macOS when the original logic only omitted the exit code check.pull/7752/head
parent
7cb7cdf88d
commit
114c3f5665
|
|
@ -1002,10 +1002,11 @@ fn childExited(self: *Surface, info: apprt.surface.Message.ChildExited) void {
|
||||||
if (info.runtime_ms <= self.config.abnormal_command_exit_runtime_ms) runtime: {
|
if (info.runtime_ms <= self.config.abnormal_command_exit_runtime_ms) runtime: {
|
||||||
// On macOS, our exit code detection doesn't work, possibly
|
// On macOS, our exit code detection doesn't work, possibly
|
||||||
// because of our `login` wrapper. More investigation required.
|
// because of our `login` wrapper. More investigation required.
|
||||||
if (comptime builtin.target.os.tag.isDarwin()) break :runtime;
|
if (comptime !builtin.target.os.tag.isDarwin()) {
|
||||||
|
// If the exit code is 0 then we it was a good exit.
|
||||||
|
if (info.exit_code == 0) break :runtime;
|
||||||
|
}
|
||||||
|
|
||||||
// If the exit code is 0 then we it was a good exit.
|
|
||||||
if (info.exit_code == 0) break :runtime;
|
|
||||||
log.warn("abnormal process exit detected, showing error message", .{});
|
log.warn("abnormal process exit detected, showing error message", .{});
|
||||||
|
|
||||||
// Update our terminal to note the abnormal exit. In the future we
|
// Update our terminal to note the abnormal exit. In the future we
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue