VirtualBox

Changeset 2404 in vbox for trunk/src/libs/xpcom18a4/ipc/ipcd


Ignore:
Timestamp:
Apr 27, 2007 3:40:20 PM (18 years ago)
Author:
vboxsync
Message:

XPCOM/IPC: Disable inheritance of the IPC socket's file descriptor to let the IPC daemon see the client termination even if one client's children (or their children) is still running.

Location:
trunk/src/libs/xpcom18a4/ipc/ipcd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/ipc/ipcd/client/src/ipcConnectionUnix.cpp

    r1 r2404  
    179179  }
    180180
     181  // disable inheritance of the IPC socket by children started
     182  // using non-NSPR process API
     183  PRStatus status = PR_SetFDInheritable(fd, PR_FALSE);
     184  if (status != PR_SUCCESS)
     185  {
     186    LOG(("coudn't make IPC socket non-inheritable [err=%d]\n", PR_GetError()));
     187    return NULL;
     188  }
     189
    181190  // store this only if we are going to succeed.
    182191  s->fds[SOCK].fd = fd;
  • trunk/src/libs/xpcom18a4/ipc/ipcd/daemon/src/ipcdUnix.cpp

    r1 r2404  
    508508            kill(getppid(), SIGINT);
    509509        }
    510 #endif
    511     }
     510    }
     511#endif
    512512
    513513    return 0;
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