Changeset 6132 in vbox for trunk/src/VBox/Additions/common/VBoxService
- Timestamp:
- Dec 18, 2007 4:06:36 PM (17 years ago)
- Location:
- trunk/src/VBox/Additions/common/VBoxService
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/Makefile.kmk
r6118 r6132 39 39 $(VBOX_LIB_VBGL_R3) \ 40 40 $(VBOX_LIB_IPRT_GUEST_R3) 41 VBoxService_LIBS.solaris = daemon 41 42 42 43 include $(PATH_KBUILD)/subfooter.kmk -
trunk/src/VBox/Additions/common/VBoxService/VBoxService-solaris.cpp
r6121 r6132 26 26 #include <signal.h> 27 27 #include <fcntl.h> 28 #include <libdaemon/dfork.h> 29 #include <libdaemon/dsignal.h> 28 30 29 31 /** 30 * Solaris daemon() call . Probably might work for other Unix.32 * Solaris daemon() call uses libdaemon. 31 33 * 32 34 * @returns 0 on success … … 34 36 int daemon(int nochdir, int noclose) 35 37 { 38 pid_t pid = daemon_fork(); 39 if (pid < 0) 40 { 41 daemon_retval_done(); 42 return -1; 43 } 44 45 if (pid) 46 exit(0); 47 48 daemon_close_all(-1); 49 return 0; 50 #if 0 36 51 if (getppid() == 1) /* We already belong to init process */ 37 52 return -1; … … 52 67 int size = getdtablesize(); 53 68 if (size < 0) 54 size = 3;69 size = 2; 55 70 56 71 for (int i = size; i >= 0; i--) … … 74 89 } 75 90 return 0; 91 #endif 76 92 } 77 93
Note:
See TracChangeset
for help on using the changeset viewer.