add gitAnnexChildProcess and use instead of incorrect use of runsGitAnnexChildProcess
Fixes reversion in 8.20200617 that made annex.pidlock being enabled result in some commands stalling, particularly those needing to autoinit. Renamed runsGitAnnexChildProcess to make clearer where it should be used. Arguably, it would be better to have a way to make any process git-annex runs have the env var set. But then it would need to take the pid lock when running any and all processes, and that would be a problem when git-annex runs two processes concurrently. So, I'm left doing it ad-hoc in places where git-annex really does run a child process, directly or indirectly via a particular git command.
This commit is contained in:
parent
6b0532e532
commit
7bdb0cdc0d
9 changed files with 97 additions and 33 deletions
|
@ -15,6 +15,7 @@ module Utility.LockFile.PidLock (
|
|||
checkLocked,
|
||||
checkSaneLock,
|
||||
pidLockEnv,
|
||||
pidLockEnvValue,
|
||||
) where
|
||||
|
||||
import Utility.PartialPrelude
|
||||
|
@ -293,3 +294,6 @@ pidLockEnv :: FilePath -> IO String
|
|||
pidLockEnv lockfile = do
|
||||
abslockfile <- absPath lockfile
|
||||
return $ "PIDLOCK_" ++ filter legalInEnvVar abslockfile
|
||||
|
||||
pidLockEnvValue :: String
|
||||
pidLockEnvValue = "1"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue