diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-09-30 14:42:48 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-09-30 14:47:36 -0400 |
commit | d1d8395a3745fd81dc0a0ee8a590a22f85cc5bd4 (patch) | |
tree | fd75c92ca301d68eeda0235063a9415530169a53 /Remote/External | |
parent | f42a64198f18708623fc7a6f7e53cfb3b9e5642b (diff) |
include external special remote process number in debug
Not actual pid, because System.Process does not expose that.
Diffstat (limited to 'Remote/External')
-rw-r--r-- | Remote/External/Types.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Remote/External/Types.hs b/Remote/External/Types.hs index 98d391df8..33a22aeb1 100644 --- a/Remote/External/Types.hs +++ b/Remote/External/Types.hs @@ -48,6 +48,7 @@ data External = External , externalState :: TMVar [ExternalState] -- ^ TMVar is never left empty; list contains states for external -- special remote processes that are not currently in use. + , externalLastPid :: TMVar PID , externalDefaultConfig :: RemoteConfig , externalGitConfig :: RemoteGitConfig } @@ -57,6 +58,7 @@ newExternal externaltype u c gc = liftIO $ External <$> pure externaltype <*> pure u <*> atomically (newTMVar []) + <*> atomically (newTMVar 0) <*> pure c <*> pure gc @@ -66,12 +68,15 @@ data ExternalState = ExternalState { externalSend :: Handle , externalReceive :: Handle , externalShutdown :: IO () + , externalPid :: PID , externalPrepared :: TMVar PrepareStatus -- ^ Never left empty. , externalConfig :: TMVar RemoteConfig -- ^ Never left empty. } +type PID = Int + data PrepareStatus = Unprepared | Prepared | FailedPrepare ErrorMsg -- Messages that can be sent to the external remote to request it do something. |