VirtualBox

Changeset 96475 in vbox for trunk/src/VBox/Runtime/r3/posix


Ignore:
Timestamp:
Aug 25, 2022 2:27:54 AM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
153323
Message:

IPRT: Resolve SetHandleInformation and GetHandleInformation dynamically and let the affected code deal with it specifically. Refactored the rtSocketCreate function to combine with setting inheritance, so we can use the WSA_FLAG_NO_HANDLE_INHERIT when available to avoid explicitly setting inheritance. Made RTSocketSetInheritance check the status before trying to set it, returning VERR_NET_NOT_UNSUPPORTED if tool old windows version. Also made GetVersionExW go via a function pointer since it wasn't there in NT 3.1. bugref:10261

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/posix/localipc-posix.cpp

    r96407 r96475  
    242242                 * Create the local (unix) socket and bind to it.
    243243                 */
    244                 rc = rtSocketCreate(&pThis->hSocket, AF_LOCAL, SOCK_STREAM, 0 /*iProtocol*/);
     244                rc = rtSocketCreate(&pThis->hSocket, AF_LOCAL, SOCK_STREAM, 0 /*iProtocol*/, false /*fInheritable*/);
    245245                if (RT_SUCCESS(rc))
    246246                {
    247                     RTSocketSetInheritance(pThis->hSocket, false /*fInheritable*/);
    248247                    signal(SIGPIPE, SIG_IGN); /* Required on solaris, at least. */
    249248
     
    561560                 * Create the local (unix) socket and try connect to the server.
    562561                 */
    563                 rc = rtSocketCreate(&pThis->hSocket, AF_LOCAL, SOCK_STREAM, 0 /*iProtocol*/);
     562                rc = rtSocketCreate(&pThis->hSocket, AF_LOCAL, SOCK_STREAM, 0 /*iProtocol*/, false /*fInheritable*/);
    564563                if (RT_SUCCESS(rc))
    565564                {
    566                     RTSocketSetInheritance(pThis->hSocket, false /*fInheritable*/);
    567565                    signal(SIGPIPE, SIG_IGN); /* Required on solaris, at least. */
    568566
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