VirtualBox

Changeset 86414 in vbox for trunk/src/VBox/Runtime


Ignore:
Timestamp:
Oct 2, 2020 11:41:26 AM (4 years ago)
Author:
vboxsync
Message:

IPRT,++: Adding a fLeaveOpen parameter to RTHandleGetStandard. Currently only honored/implemented for pipes. bugref:9841

Location:
trunk/src/VBox/Runtime
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/vfs/vfsmisc.cpp

    r82968 r86414  
    6161     */
    6262    RTHANDLE h;
    63     int rc = RTHandleGetStandard(enmStdHandle, &h);
     63    int rc = RTHandleGetStandard(enmStdHandle, fLeaveOpen, &h);
    6464    if (RT_SUCCESS(rc))
    6565    {
  • trunk/src/VBox/Runtime/r3/posix/RTHandleGetStandard-posix.cpp

    r82968 r86414  
    5353
    5454
    55 RTDECL(int) RTHandleGetStandard(RTHANDLESTD enmStdHandle, PRTHANDLE ph)
     55RTDECL(int) RTHandleGetStandard(RTHANDLESTD enmStdHandle, bool fLeaveOpen, PRTHANDLE ph)
    5656{
    5757    /*
     
    108108    {
    109109        case RTHANDLETYPE_FILE:
     110            /** @todo fLeaveOpen   */
    110111            rc = RTFileFromNative(&h.u.hFile, fd);
    111112            break;
     
    114115            rc = RTPipeFromNative(&h.u.hPipe, fd,
    115116                                    (enmStdHandle == RTHANDLESTD_INPUT ? RTPIPE_N_READ : RTPIPE_N_WRITE)
    116                                   | (fInherit ? RTPIPE_N_INHERIT : 0));
     117                                  | (fInherit ? RTPIPE_N_INHERIT : 0)
     118                                  | (fLeaveOpen ? RTPIPE_N_LEAVE_OPEN : 0));
    117119            break;
    118120
    119121        case RTHANDLETYPE_SOCKET:
     122            /** @todo fLeaveOpen   */
    120123            rc = rtSocketCreateForNative(&h.u.hSocket, fd);
    121124            break;
  • trunk/src/VBox/Runtime/r3/win/RTHandleGetStandard-win.cpp

    r82968 r86414  
    4343
    4444
    45 RTDECL(int) RTHandleGetStandard(RTHANDLESTD enmStdHandle, PRTHANDLE ph)
     45RTDECL(int) RTHandleGetStandard(RTHANDLESTD enmStdHandle, bool fLeaveOpen, PRTHANDLE ph)
    4646{
    4747    /*
     
    102102    {
    103103        case RTHANDLETYPE_FILE:
     104            /** @todo fLeaveOpen   */
    104105            rc = RTFileFromNative(&h.u.hFile, (RTHCUINTPTR)hNative);
    105106            break;
     
    108109            rc = RTPipeFromNative(&h.u.hPipe, (RTHCUINTPTR)hNative,
    109110                                    (enmStdHandle == RTHANDLESTD_INPUT ? RTPIPE_N_READ : RTPIPE_N_WRITE)
    110                                   | (fInherit ? RTPIPE_N_INHERIT : 0));
     111                                  | (fInherit ? RTPIPE_N_INHERIT : 0)
     112                                  | (fLeaveOpen ? RTPIPE_N_LEAVE_OPEN : 0));
    111113            break;
    112114
    113115        case RTHANDLETYPE_SOCKET:
     116            /** @todo fLeaveOpen */
    114117            rc = rtSocketCreateForNative(&h.u.hSocket, (RTHCUINTPTR)hNative);
    115118            break;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette