VirtualBox

Changeset 86412 in vbox for trunk/include


Ignore:
Timestamp:
Oct 2, 2020 11:39:26 AM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
140713
Message:

IPRT/pipe: Adding RTPipeCloseEx w/ a fLeaveOpen parameter so we can prevent leaks via RTHandleGetStandard. Adding RTPIPE_N_LEAVE_OPEN to RTPipeFromNative. bugref:9841

Location:
trunk/include/iprt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/mangling.h

    r86300 r86412  
    17401740# define RTPathUserHome                                 RT_MANGLER(RTPathUserHome)
    17411741# define RTPipeClose                                    RT_MANGLER(RTPipeClose)
     1742# define RTPipeCloseEx                                  RT_MANGLER(RTPipeCloseEx)
    17421743# define RTPipeCreate                                   RT_MANGLER(RTPipeCreate)
    17431744# define RTPipeFlush                                    RT_MANGLER(RTPipeFlush)
  • trunk/include/iprt/pipe.h

    r82968 r86412  
    7070
    7171/**
     72 * Closes one end of a pipe created by RTPipeCreate, extended version.
     73 *
     74 * @returns IPRT status code.
     75 * @param   hPipe           The pipe end to close.
     76 * @param   fLeaveOpen      Wheter to leave the underlying native handle open
     77 *                          (for RTPipeClose() this is @c false).
     78 */
     79RTDECL(int)  RTPipeCloseEx(RTPIPE hPipe, bool fLeaveOpen);
     80
     81/**
    7282 * Creates an IPRT pipe handle from a native one.
    7383 *
     
    91101/** Make sure the pipe is inheritable if set and not inheritable when clear. */
    92102#define RTPIPE_N_INHERIT            RT_BIT(2)
    93 /** Mask of valid flags. */
     103/** Mask of valid flags for . */
    94104#define RTPIPE_N_VALID_MASK         UINT32_C(0x00000007)
     105/** RTPipeFromNative: Leave the native pipe handle open on close. */
     106#define RTPIPE_N_LEAVE_OPEN         RT_BIT(3)
     107/** Mask of valid flags for RTPipeFromNative(). */
     108#define RTPIPE_N_VALID_MASK_FN      UINT32_C(0x0000000f)
    95109/** @} */
    96110
Note: See TracChangeset for help on using the changeset viewer.

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