include external special remote process number in debug
Not actual pid, because System.Process does not expose that.
This commit is contained in:
parent
5bf4623a1d
commit
37c8c6df99
2 changed files with 19 additions and 10 deletions
5
Remote/External/Types.hs
vendored
5
Remote/External/Types.hs
vendored
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue