VirtualBox

Ignore:
Timestamp:
Feb 26, 2009 6:04:58 PM (16 years ago)
Author:
vboxsync
Message:

Main/Unix: clean up code, make it work properly with EACCES and other errors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/MachineImpl.cpp

    r17180 r17182  
    77677767        key = ((uint32_t)'V' << 24) | i;
    77687768        int sem = ::semget (key, 1, S_IRUSR | S_IWUSR | IPC_CREAT | IPC_EXCL);
    7769         if (sem < 0 && errno == EEXIST)
    7770             continue;
    7771         mIPCSem = sem;
    7772         if (sem >= 0)
    7773         {
    7774             mIPCKey = BstrFmt ("%u", key);
     7769        if (sem >= 0 || (errno != EEXIST && errno != EACCES))
     7770        {
     7771            mIPCSem = sem;
     7772            if (sem >= 0)
     7773                mIPCKey = BstrFmt ("%u", key);
    77757774            break;
    77767775        }
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