Jakob Borg 7b686c1103 Implement signal handling
With this change, the behavior is as follows:

 - SIGTERM / SIGINT: Exit cleanly (exit code 0)
 - SIGHUP: Restart

This is the case both when hitting the monitor process or the inner
process, or if running with NORESTART (but then we won't restart,
obviously, just exit with code exitRestarting).

It enables "pkill -HUP syncthing" to do the right thing to restart all
Syncthings on package upgrade, for example.
2015-12-14 13:07:42 +01:00
..
2015-04-04 21:59:54 +02:00
2014-03-30 21:59:40 +02:00
2015-08-09 09:35:26 +02:00
2015-08-09 09:35:26 +02:00
2015-03-17 16:02:27 +01:00
2015-08-09 09:35:26 +02:00
2015-03-17 16:02:27 +01:00
2015-03-17 16:02:27 +01:00
2015-03-17 16:02:27 +01:00
2015-03-17 16:02:27 +01:00
2015-12-14 13:07:42 +01:00
2015-03-17 16:02:27 +01:00
2015-03-17 16:02:27 +01:00
2015-03-17 16:02:27 +01:00
2015-03-17 16:02:27 +01:00
2015-03-17 16:02:27 +01:00
2015-03-17 16:02:27 +01:00
2015-12-14 13:07:42 +01:00
2015-03-17 16:02:27 +01:00
2015-03-17 16:02:27 +01:00
2015-09-22 19:38:46 +02:00
2015-03-17 16:02:27 +01:00
2015-03-17 16:02:27 +01:00