diff options
Diffstat (limited to 'src/daemon.zig')
| -rw-r--r-- | src/daemon.zig | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/daemon.zig b/src/daemon.zig index c6cd7f85..467af8b8 100644 --- a/src/daemon.zig +++ b/src/daemon.zig @@ -577,9 +577,10 @@ pub var stub: c_int = -1; extern "c" fn procctl(idtype: c_int, id: i64, cmd: c_int, data: ?*anyopaque) c_int; -/// A HUP when this process's parent dies (a forked session's stub), or no -/// longer. Linux keeps it per thread: set and cleared on the main one. -fn hupOnStubDeath(on: bool) void { +/// A HUP when this process's parent dies (a forked session's stub, an +/// --attach client's ssh), or no longer. Linux keeps it per thread: set and +/// cleared on the main one. +pub fn hupOnStubDeath(on: bool) void { var sig: c_int = if (on) @backingInt(posix.SIG.HUP) else 0; switch (builtin.os.tag) { .linux => _ = std.os.linux.prctl(@backingInt(std.os.linux.PR.SET_PDEATHSIG), @intCast(sig), 0, 0, 0), |
