From: Sergey Matveev Date: Thu, 7 Oct 2021 10:31:31 +0000 (+0300) Subject: Linux does not have SIGINFO X-Git-Url: http://www.git.stargrave.org/?p=godlighty.git;a=commitdiff_plain;h=69d03cb4e2a8f22a0f59cc32448b2d5dddd039ff Linux does not have SIGINFO --- diff --git a/cmd/godlighty/info.go b/cmd/godlighty/info.go new file mode 100644 index 0000000..fc3e8c1 --- /dev/null +++ b/cmd/godlighty/info.go @@ -0,0 +1,8 @@ +//go:build !linux +// +build !linux + +package main + +import "syscall" + +var InfoSignal = syscall.SIGINFO diff --git a/cmd/godlighty/info_linux.go b/cmd/godlighty/info_linux.go new file mode 100644 index 0000000..386d6b3 --- /dev/null +++ b/cmd/godlighty/info_linux.go @@ -0,0 +1,8 @@ +//go:build linux +// +build linux + +package main + +import "syscall" + +var InfoSignal = syscall.SIGUSR1 diff --git a/cmd/godlighty/main.go b/cmd/godlighty/main.go index e15c165..1344aaa 100644 --- a/cmd/godlighty/main.go +++ b/cmd/godlighty/main.go @@ -96,7 +96,7 @@ func main() { } info := make(chan os.Signal) - signal.Notify(info, syscall.SIGINFO) + signal.Notify(info, InfoSignal) go func() { for { <-info diff --git a/doc/index.texi b/doc/index.texi index 9265d5e..2b86584 100644 --- a/doc/index.texi +++ b/doc/index.texi @@ -61,7 +61,8 @@ have to recompile it every time configuration changes. Is it a problem? I doubt, because Go is very fast. But it produces huge statically linked executables, you say! Use @command{bsdiff}/@command{bspatch}! -Send @code{SIGINFO} signal to get current daemon's configuration. +Send @code{SIGINFO} (@code{SIGUSR1} on Linux) signal to get current +daemon's configuration. Initially @command{godlighty} has basic static files handlers (with compression, HTTP preconditions are enabled of course). In the example