diff options
Diffstat (limited to 'script/public-inbox-watch')
-rwxr-xr-x | script/public-inbox-watch | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/script/public-inbox-watch b/script/public-inbox-watch index 51f1baa2..0d1cd831 100755 --- a/script/public-inbox-watch +++ b/script/public-inbox-watch @@ -17,6 +17,10 @@ if ($watch_md) { $SIG{HUP} = $reload; $SIG{USR1} = $scan; $SIG{ALRM} = sub { $SIG{ALRM} = 'DEFAULT'; $scan->() }; + $SIG{QUIT} = $SIG{TERM} = $SIG{INT} = sub { + $watch_md->quit if $watch_md; + $watch_md = undef; + }; alarm(1); $watch_md->watch while ($watch_md); } |