ソースを参照

refactor(syncthing): use named constant for SIGHUP (#10168)

ardevd 4 ヶ月 前
コミット
c14abebd68
1 ファイル変更1 行追加2 行削除
  1. 1 2
      cmd/syncthing/main.go

+ 1 - 2
cmd/syncthing/main.go

@@ -613,8 +613,7 @@ func setupSignalHandling(app *syncthing.App) {
 	// Exit cleanly with "restarting" code on SIGHUP.
 
 	restartSign := make(chan os.Signal, 1)
-	sigHup := syscall.Signal(1)
-	signal.Notify(restartSign, sigHup)
+	signal.Notify(restartSign, syscall.SIGHUP)
 	go func() {
 		<-restartSign
 		app.Stop(svcutil.ExitRestart)