if (inheritable) flags &= ~OPEN_FLAGS_NOINHERIT; else flags |= OPEN_FLAGS_NOINHERIT;  rv = DosSetFHState((HFILE)fd->secret->md.osfd, flags); if (rv != 0) { PR_SetError(PR_UNKNOWN_ERROR, _MD_ERRNO()); return PR_FAILURE; }
_PR_MD_SET_FD_INHERITABLE(PRFileDesc *fd, PRBool inheritable){    int rv = 0;    ULONG flags;    rv = DosQueryFHState((HFILE)fd->secret->md.osfd, &flags);    if (rv != 0) {        PR_SetError(PR_UNKNOWN_ERROR, _MD_ERRNO());        return PR_FAILURE;    }    if (inheritable)      flags &= ~OPEN_FLAGS_NOINHERIT;    else      flags |= OPEN_FLAGS_NOINHERIT;    rv = DosSetFHState((HFILE)fd->secret->md.osfd, flags);    if (rv != 0) {        PR_SetError(PR_UNKNOWN_ERROR, _MD_ERRNO());        return PR_FAILURE;    }    return PR_SUCCESS;}