diff options
Diffstat (limited to 'src/process.cpp')
-rw-r--r-- | src/process.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/process.cpp b/src/process.cpp index e6b9f3d..55824ae 100644 --- a/src/process.cpp +++ b/src/process.cpp | |||
@@ -176,8 +176,9 @@ void Bu::Process::close() | |||
176 | { | 176 | { |
177 | if( iPid ) | 177 | if( iPid ) |
178 | { | 178 | { |
179 | ::close( iStdIn ); | 179 | if( iStdIn > -1 ) |
180 | if( iStdErr > -1 ) | 180 | ::close( iStdIn ); |
181 | if( iStdOut > -1 ) | ||
181 | ::close( iStdOut ); | 182 | ::close( iStdOut ); |
182 | if( iStdErr > -1 ) | 183 | if( iStdErr > -1 ) |
183 | ::close( iStdErr ); | 184 | ::close( iStdErr ); |
@@ -186,6 +187,18 @@ void Bu::Process::close() | |||
186 | } | 187 | } |
187 | } | 188 | } |
188 | 189 | ||
190 | void Bu::Process::closeStdIn() | ||
191 | { | ||
192 | ::close( iStdIn ); | ||
193 | iStdIn = -1; | ||
194 | } | ||
195 | |||
196 | void Bu::Process::closeStdOut() | ||
197 | { | ||
198 | ::close( iStdOut ); | ||
199 | iStdOut = -1; | ||
200 | } | ||
201 | |||
189 | Bu::size Bu::Process::read( void *pBuf, Bu::size nBytes ) | 202 | Bu::size Bu::Process::read( void *pBuf, Bu::size nBytes ) |
190 | { | 203 | { |
191 | if( bStdOutEos ) | 204 | if( bStdOutEos ) |