| ... | @@ -389,11 +389,8 @@ pub const File = struct { | ... | @@ -389,11 +389,8 @@ pub const File = struct { |
| 389 | try emit.directory.handle.copyFile(emit.sub_path, emit.directory.handle, tmp_sub_path, .{}); | 389 | try emit.directory.handle.copyFile(emit.sub_path, emit.directory.handle, tmp_sub_path, .{}); |
| 390 | try emit.directory.handle.rename(tmp_sub_path, emit.sub_path); | 390 | try emit.directory.handle.rename(tmp_sub_path, emit.sub_path); |
| 391 | switch (builtin.os.tag) { | 391 | switch (builtin.os.tag) { |
| 392 | .linux => { | 392 | .linux => std.os.ptrace(std.os.linux.PTRACE.ATTACH, pid, 0, 0) catch |err| { |
| 393 | switch (std.os.errno(std.os.linux.ptrace(std.os.linux.PTRACE.ATTACH, pid, 0, 0, 0))) { | 393 | log.warn("ptrace failure: {s}", .{@errorName(err)}); |
| 394 | .SUCCESS => {}, | | |
| 395 | else => |errno| log.warn("ptrace failure: {s}", .{@tagName(errno)}), | | |
| 396 | } | | |
| 397 | }, | 394 | }, |
| 398 | else => return error.HotSwapUnavailableOnHostOperatingSystem, | 395 | else => return error.HotSwapUnavailableOnHostOperatingSystem, |
| 399 | } | 396 | } |
| ... | @@ -430,11 +427,8 @@ pub const File = struct { | ... | @@ -430,11 +427,8 @@ pub const File = struct { |
| 430 | | 427 | |
| 431 | if (base.child_pid) |pid| { | 428 | if (base.child_pid) |pid| { |
| 432 | switch (builtin.os.tag) { | 429 | switch (builtin.os.tag) { |
| 433 | .linux => { | 430 | .linux => std.os.ptrace(std.os.linux.PTRACE.DETACH, pid, 0, 0) catch |err| { |
| 434 | switch (std.os.errno(std.os.linux.ptrace(std.os.linux.PTRACE.DETACH, pid, 0, 0, 0))) { | 431 | log.warn("ptrace failure: {s}", .{@errorName(err)}); |
| 435 | .SUCCESS => {}, | | |
| 436 | else => |errno| log.warn("ptrace failure: {s}", .{@tagName(errno)}), | | |
| 437 | } | | |
| 438 | }, | 432 | }, |
| 439 | else => return error.HotSwapUnavailableOnHostOperatingSystem, | 433 | else => return error.HotSwapUnavailableOnHostOperatingSystem, |
| 440 | } | 434 | } |