CLI Shutdown

#1

Some entries in this forum suggest to quit syncthing via TERM(15) signal. Comparing both activities shows different output:

  1. SHUTDOWN VIA WEBUI

    [XYZWQ] 14:53:14 INFO: Access the GUI via the following URL: http://127.0.0.1:qwertz/

    [XYZWQ] 14:53:21 INFO: Shutting down

    [XYZWQ] 14:53:21 INFO: TCP listener ([::]:qwertz+1) shutting down

    [XYZWQ] 14:53:31 INFO: Exiting

  2. pkill -TERM syncthing

    [XYZWQ] 14:52:28 INFO: Access the GUI via the following URL: http://127.0.0.1:qwertz/

    [monitor] 14:52:35 INFO: Signal 15 received; exiting

  3. JUST FOR REFERENCE: pkill -HUP syncthing

    [5R3WQ] 14:43:58 INFO: Access the GUI via the following URL: http://127.0.0.1:qwertz/

    [monitor] 14:44:06 INFO: Signal 1 received; restarting

    [XYZWQ] 14:44:06 INFO: TCP listener ([::]:qwertz+1) shutting down

    [XYZWQ] 14:44:16 INFO: Exiting

    [monitor] 14:44:16 INFO: Syncthing exited: exit status 3

    [monitor] 14:44:17 INFO: Starting syncthing

So, pkill -TERM looks like the hard way. Is this really the right way or rephrased : does ST perform the shut down correctly anyway?

Thanks!

0 Likes

(Simon) #2

You found a bug in the monitor: When intercepting TERM it kills the main syncthing process, instead of signalling it to stop (i.e. passing TERM on). Could you please open an issue on github.

0 Likes

#3
0 Likes

(Jakob Borg) #4

pkill is anyway a bit non-deterministic when Syncthing is running with the monitor, as pkill will hit both processes.

0 Likes

(system) closed #5

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

0 Likes