@@ -138,16 +138,18 @@ teeHandle orig f =
138
138
-- | 'CompleteProcessConfig' contains the configuration necessary for starting a
139
139
-- process. It is essentially a stripped down 'System.Process.CreateProcess'.
140
140
data CompleteProcessConfig = CompleteProcessConfig
141
- { completeProcessConfigEnvVars :: [(String , String )]
141
+ { completeProcessConfigEnvVars :: [(String , String )]
142
142
-- ^ Environment variables
143
- , completeProcessConfigCmdLine :: [String ]
143
+ , completeProcessConfigCmdLine :: [String ]
144
144
-- ^ Command line arguements
145
- , completeProcessConfigStdIn :: Handle
145
+ , completeProcessConfigStdIn :: Handle
146
146
-- ^ The 'Handle' for standard input
147
- , completeProcessConfigStdOut :: Handle
147
+ , completeProcessConfigStdOut :: Handle
148
148
-- ^ The 'Handle' for standard output
149
- , completeProcessConfigStdErr :: Handle
149
+ , completeProcessConfigStdErr :: Handle
150
150
-- ^ The 'Handle' for standard error
151
+ , completeProcessConfigCreateGroup :: Bool
152
+ -- ^ Whether or not to create new process group
151
153
}
152
154
153
155
prettyHandle :: Handle -> Doc
@@ -174,6 +176,10 @@ instance Pretty CompleteProcessConfig where
174
176
<> hardline
175
177
<> text " completeProcessConfigStdErr:"
176
178
<+> prettyHandle completeProcessConfigStdErr
179
+ <> hardline
180
+ <> text " completeProcessConfigCreateGroup:"
181
+ <> softline
182
+ <> pretty completeProcessConfigCreateGroup
177
183
178
184
-- | Start a process interactively and return the 'ProcessHandle'
179
185
startProcess
@@ -188,6 +194,7 @@ startProcess name CompleteProcessConfig {..} = (\(_, _, _, x) -> x) <$>
188
194
, std_out = UseHandle completeProcessConfigStdOut
189
195
, std_in = UseHandle completeProcessConfigStdIn
190
196
, env = Just completeProcessConfigEnvVars
197
+ , create_group = completeProcessConfigCreateGroup
191
198
}
192
199
193
200
-- | Stop a 'ProcessHandle'. An alias for 'waitForProcess'
0 commit comments