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