]> Sergey Matveev's repositories - godlighty.git/commitdiff
Linux does not have SIGINFO
authorSergey Matveev <stargrave@stargrave.org>
Thu, 7 Oct 2021 10:31:31 +0000 (13:31 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 7 Oct 2021 10:36:05 +0000 (13:36 +0300)
cmd/godlighty/info.go [new file with mode: 0644]
cmd/godlighty/info_linux.go [new file with mode: 0644]
cmd/godlighty/main.go
doc/index.texi

diff --git a/cmd/godlighty/info.go b/cmd/godlighty/info.go
new file mode 100644 (file)
index 0000000..fc3e8c1
--- /dev/null
@@ -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 (file)
index 0000000..386d6b3
--- /dev/null
@@ -0,0 +1,8 @@
+//go:build linux
+// +build linux
+
+package main
+
+import "syscall"
+
+var InfoSignal = syscall.SIGUSR1
index e15c165fe500f799c0c97367c59a1a8e324f8179..1344aaa40ca51d29ea5fc709a658bee4634c8615 100644 (file)
@@ -96,7 +96,7 @@ func main() {
        }
 
        info := make(chan os.Signal)
-       signal.Notify(info, syscall.SIGINFO)
+       signal.Notify(info, InfoSignal)
        go func() {
                for {
                        <-info
index 9265d5eac833cc40951c126cb462c9d2d1ae6cf6..2b865846b680e7548b668ba9fdf2848819bfa489 100644 (file)
@@ -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