VirtualBox

Ignore:
Timestamp:
Sep 17, 2007 8:08:17 PM (17 years ago)
Author:
vboxsync
Message:

The vboxdrv descriptor must be marked close on exec.

Location:
trunk/src/VBox/HostDrivers/Support
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/darwin/SUPLib-darwin.cpp

    r4811 r4871  
    134134
    135135    /*
     136     * Mark the file handle close on exec.
     137     */
     138    if (fcntl(g_hDevice, F_SETFD, FD_CLOEXEC) != 0)
     139    {
     140        int rc = errno;
     141        LogRel(("suplibOSInit: setting FD_CLOEXEC failed, errno=%d\n", errno));
     142        close(g_hDevice);
     143        g_hDevice = -1;
     144        return RTErrConvertFromErrno(rc);
     145    }
     146
     147    /*
    136148     * We're done.
    137149     */
  • trunk/src/VBox/HostDrivers/Support/solaris/SUPLib-solaris.cpp

    r4823 r4871  
    7979
    8080    /*
     81     * Mark the file handle close on exec.
     82     */
     83    if (fcntl(g_hDevice, F_SETFD, FD_CLOEXEC) != 0)
     84    {
     85        int rc = errno;
     86        LogRel(("suplibOSInit: setting FD_CLOEXEC failed, errno=%d\n", errno));
     87        close(g_hDevice);
     88        g_hDevice = -1;
     89        return RTErrConvertFromErrno(rc);
     90    }
     91
     92    /*
    8193     * Avoid unused parameter warning
    82     */
     94     */
    8395    NOREF(cbReserve);
    8496
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