assistant: Detect when repository has been deleted or moved, and automatically shut down the assistant. Closes: #761261

This commit is contained in:
Joey Hess 2014-09-15 14:45:37 -04:00
parent 4e3d176b1b
commit 09e20c3827
4 changed files with 24 additions and 6 deletions

View file

@ -53,6 +53,10 @@ postRestart url = do
liftIO . sendNotification . globalRedirNotifier =<< getDaemonStatus
void $ liftIO $ forkIO $ do
threadDelaySeconds (Seconds 120)
terminateSelf
terminateSelf :: IO ()
terminateSelf =
#ifndef mingw32_HOST_OS
signalProcess sigTERM =<< getPID
#else