From 1f39aef893c6d09e5aa769ea4b781509d458195e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 2 Nov 2013 22:25:08 -0400 Subject: [PATCH] Fix zombie process that occurred when switching between repository views in the webapp. --- Assistant/WebApp/OtherRepos.hs | 8 ++++++-- debian/changelog | 2 ++ .../Zombie_processes_and__47__or_stuck_git_processes.mdwn | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Assistant/WebApp/OtherRepos.hs b/Assistant/WebApp/OtherRepos.hs index cc1207934a..f3ba4a5f64 100644 --- a/Assistant/WebApp/OtherRepos.hs +++ b/Assistant/WebApp/OtherRepos.hs @@ -61,8 +61,12 @@ getSwitchToRepositoryR repo = do threadDelay 100000 -- 1/10th of a second a +{- Returns once the assistant has daemonized, but possibly before it's + - listening for web connections. -} startAssistant :: FilePath -> IO () startAssistant repo = do program <- readProgramFile - void $ forkIO $ void $ createProcess $ - (proc program ["assistant"]) { cwd = Just repo } + (_, _, _, pid) <- + createProcess $ + (proc program ["assistant"]) { cwd = Just repo } + void $ checkSuccessProcess pid diff --git a/debian/changelog b/debian/changelog index 4948dbf339..1a8e317186 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,8 @@ git-annex (4.20131102) UNRELEASED; urgency=low * Fix enabling of gcrypt repository accessed over ssh; git-annex-shell gcryptsetup had a bug that caused it to fail with permission denied. + * Fix zombie process that occurred when switching between repository + views in the webapp. -- Joey Hess Sat, 02 Nov 2013 14:54:36 -0400 diff --git a/doc/bugs/Zombie_processes_and__47__or_stuck_git_processes.mdwn b/doc/bugs/Zombie_processes_and__47__or_stuck_git_processes.mdwn index 433be1e916..e7ff537238 100644 --- a/doc/bugs/Zombie_processes_and__47__or_stuck_git_processes.mdwn +++ b/doc/bugs/Zombie_processes_and__47__or_stuck_git_processes.mdwn @@ -40,3 +40,5 @@ git-annex assistant is currently running. Here is the output of **ps -A u | gre 31812 pts/2 Z 0:00 [git-annex] 31835 ? Ss 0:02 ssh: .git/annex/ssh/example.net [mux] """]] + +> [[fixed|done]] --[[Joey]]