Changeset 86412 in vbox for trunk/src/VBox/Runtime/r3/os2
- Timestamp:
- Oct 2, 2020 11:39:26 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/os2/pipe-os2.cpp
r82968 r86412 68 68 /** Set if this is the read end, clear if it's the write end. */ 69 69 bool fRead; 70 /** RTPipeFromNative: Leave open. */ 71 bool fLeaveOpen; 70 72 /** Whether the pipe is in blocking or non-blocking mode. */ 71 73 bool fBlocking; … … 195 197 pThisR->fRead = true; 196 198 pThisW->fRead = false; 199 pThisR->fLeaveOpen = false; 200 pThisW->fLeaveOpen = false; 197 201 pThisR->fBlocking = false; 198 202 pThisW->fBlocking = true; … … 227 231 228 232 229 RTDECL(int) RTPipeClose (RTPIPE hPipe)233 RTDECL(int) RTPipeCloseEx(RTPIPE hPipe, bool fLeaveOpen) 230 234 { 231 235 RTPIPEINTERNAL *pThis = hPipe; … … 243 247 244 248 /* Don't call DosDisConnectNPipe! */ 245 DosClose(pThis->hPipe); 249 if (!fLeaveOpen && !pThis->fLeaveOpen) 250 DosClose(pThis->hPipe); 246 251 pThis->hPipe = (HPIPE)-1; 247 252 … … 261 266 262 267 268 RTDECL(int) RTPipeClose(RTPIPE hPipe) 269 { 270 return RTPipeCloseEx(hPipe, false /*fLeaveOpen*/); 271 } 272 273 263 274 RTDECL(int) RTPipeFromNative(PRTPIPE phPipe, RTHCINTPTR hNativePipe, uint32_t fFlags) 264 275 { 265 276 AssertPtrReturn(phPipe, VERR_INVALID_POINTER); 266 AssertReturn(!(fFlags & ~RTPIPE_N_VALID_MASK ), VERR_INVALID_PARAMETER);277 AssertReturn(!(fFlags & ~RTPIPE_N_VALID_MASK_FN), VERR_INVALID_PARAMETER); 267 278 AssertReturn(!!(fFlags & RTPIPE_N_READ) != !!(fFlags & RTPIPE_N_WRITE), VERR_INVALID_PARAMETER); 268 279 … … 333 344 pThis->hPipe = hNative; 334 345 pThis->hev = NULLHANDLE; 335 pThis->fRead = !!(fFlags & RTPIPE_N_READ); 346 pThis->fRead = RT_BOOL(fFlags & RTPIPE_N_READ); 347 pThis->fLeaveOpen = RT_BOOL(fFlags & RTPIPE_N_LEAVE_OPEN); 336 348 pThis->fBlocking = !(fPipeState & NP_NOWAIT); 337 349 //pThis->fBrokenPipe = false;
Note:
See TracChangeset
for help on using the changeset viewer.