VirtualBox

Changeset 6144 in vbox


Ignore:
Timestamp:
Dec 19, 2007 5:16:07 AM (17 years ago)
Author:
vboxsync
Message:

Fixing daemon. Hope this is ok...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxService-solaris.cpp

    r6141 r6144  
    7171    setsid();
    7272
    73     int size = getdtablesize();
    74     if (size < 0)
    75         size = 2;
    76 
     73    /* Close all or only standard streams */
     74    int size = noclose ? getdtablesize() : 2;
    7775    for (int i = size; i >= 0; i--)
    7876        close(i);
     
    8785        chdir("/");     /* @todo Check if switching to '/' is the convention for Solaris daemons. */
    8886
    89     /* Set file permission to something secure. */
     87    /* Set file permission to something secure, as we need to run as root on Solaris */
    9088    umask(027);
    91     if (noclose)        /* Presuming this means ignore SIGTERM, SIGHUP... */
    92     {
    93         signal(SIGTERM, SIG_IGN);
    94         signal(SIGHUP, SIG_IGN);
    95     }
    9689    return 0;
    9790#endif
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