diff options
Diffstat (limited to 'modules/graceful/restart_unix.go')
-rw-r--r-- | modules/graceful/restart_unix.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/graceful/restart_unix.go b/modules/graceful/restart_unix.go index 8c68965f5d..3fc4f0511d 100644 --- a/modules/graceful/restart_unix.go +++ b/modules/graceful/restart_unix.go @@ -9,6 +9,7 @@ package graceful import ( "fmt" + "net" "os" "os/exec" "strings" @@ -48,6 +49,10 @@ func RestartProcess() (int, error) { if err != nil { return 0, err } + + if unixListener, ok := l.(*net.UnixListener); ok { + unixListener.SetUnlinkOnClose(false) + } // Remember to close these at the end. defer files[i].Close() } |