From bc3734c788fc713bb186c3d85f687e4a266dc705 Mon Sep 17 00:00:00 2001 From: Dave Kleinschmidt Date: Wed, 7 Aug 2024 12:20:29 -0400 Subject: [PATCH] use tempdir for graceful terminator socket when env not set --- src/graceful_termination.jl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/graceful_termination.jl b/src/graceful_termination.jl index b15b116..6823431 100644 --- a/src/graceful_termination.jl +++ b/src/graceful_termination.jl @@ -13,9 +13,8 @@ _deputy_ipc_dir() = get(tempdir, ENV, "DEPUTY_IPC_DIR") # Prefer using UNIX domain sockets but if the `DEPUTY_IPC_DIR` is set assume the file # system is read-only and use a named pipe instead. -function _graceful_terminator_socket_path(pid::Int32) - name = "graceful-terminator.$pid" - return haskey(ENV, "DEPUTY_IPC_DIR") ? joinpath(_deputy_ipc_dir(), name) : name +function _graceful_terminator_socket_path(pid::Int32) = + return joinpath(_deputy_ipc_dir(), "graceful-terminator.$pid") end # Following the Linux convention for pid files: