CLI Shutdown

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!

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.

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

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