VirtualBox

Ignore:
Timestamp:
Oct 7, 2010 10:15:26 AM (14 years ago)
Author:
vboxsync
Message:

XPCOM: implement a shortcut PR_CreateProcessDetached which directly uses IPRT to daemonize the process. XPCOM only starts IPCD this way, and its own code didn't properly detach it, it remained a child of the client which triggered the IPCD start.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/nsprpub/pr/include/md/_unixos.h

    r1 r32971  
    173173
    174174#if defined(DEBUG) && !defined(DARWIN) && !defined(NEXTSTEP)
    175 #if !defined(SOLARIS)   
     175#if !defined(SOLARIS)
    176176#include <string.h>  /* for memset() */
    177177#define _MD_INIT_STACK(ts,REDZONE)                                      \
     
    218218#endif  /* DEBUG */
    219219
    220 #if !defined(SOLARIS) 
     220#if !defined(SOLARIS)
    221221
    222222#define PR_SET_INTSOFF(newval)
     
    246246);
    247247
     248#ifdef VBOX
     249/* Create a new detached process (fork() + exec()) */
     250#define _MD_CREATE_PROCESS_DETACHED _MD_CreateUnixProcessDetached
     251extern PRStatus _MD_CreateUnixProcessDetached(
     252    const char *path,
     253    char *const *argv,
     254    char *const *envp,
     255    const struct PRProcessAttr *attr
     256);
     257#endif /* VBOX */
     258
    248259#define _MD_DETACH_PROCESS _MD_DetachUnixProcess
    249260extern PRStatus _MD_DetachUnixProcess(struct PRProcess *process);
     
    297308
    298309extern void             _MD_MakeNonblock(PRFileDesc *fd);
    299 #define _MD_MAKE_NONBLOCK                       _MD_MakeNonblock               
     310#define _MD_MAKE_NONBLOCK                       _MD_MakeNonblock
    300311
    301312/************************************************************************/
     
    401412#define _MD_SHUTDOWN    _MD_shutdown
    402413
    403 extern PRInt32          _MD_recv(PRFileDesc *fd, void *buf, PRInt32 amount, 
     414extern PRInt32          _MD_recv(PRFileDesc *fd, void *buf, PRInt32 amount,
    404415                               PRIntn flags, PRIntervalTime timeout);
    405416#define _MD_RECV        _MD_recv
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