Changeset 3388 in vbox for trunk/src/VBox/Main
- Timestamp:
- Jul 3, 2007 11:42:41 AM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 22586
- Location:
- trunk/src/VBox/Main/linux
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/linux/server.cpp
r3191 r3388 984 984 } 985 985 986 static RTFILE pidFile = NIL_RTFILE; 987 988 #ifdef __OS2__ 989 990 /* nothing to do here, the process is supposed to be already 991 * started daemonized when it is necessary */ 992 NOREF(fDaemonize); 993 994 #else // ifdef __OS2__ 995 986 996 static int daemon_pipe_fds[2]; 987 static RTFILE pidFile = NIL_RTFILE;988 997 989 998 if (fDaemonize) … … 1046 1055 close(daemon_pipe_fds[0]); 1047 1056 } 1057 1058 #endif // ifdef __OS2__ 1048 1059 1049 1060 #if defined(USE_BACKTRACE) … … 1161 1172 { 1162 1173 printf ("\nStarting event loop....\n[send TERM signal to quit]\n"); 1174 #ifndef __OS2__ 1163 1175 /* now we're ready, signal the parent process */ 1164 1176 write(daemon_pipe_fds[1], "READY", strlen("READY")); 1177 #endif 1165 1178 } 1166 1179 else … … 1220 1233 if (fDaemonize) 1221 1234 { 1235 #ifndef __OS2__ 1222 1236 /* close writing end of the pipe as well */ 1223 1237 close(daemon_pipe_fds[1]); 1238 #endif 1224 1239 } 1225 1240 -
trunk/src/VBox/Main/linux/server_module.cpp
r2981 r3388 20 20 */ 21 21 22 #ifdef __OS2__ 23 # include <prproces.h> 24 #endif 25 22 26 #include <nsMemory.h> 23 27 #include <nsString.h> … … 165 169 startedOnce = true; 166 170 171 #ifdef __OS2__ 172 char *const args[] = { VBoxSVCPath, "--automate", 0 }; 173 /* use NSPR because we want the process to be detached right 174 * at startup (it isn't possible to detach it later on) */ 175 PRStatus rv = PR_CreateProcessDetached (VBoxSVCPath, 176 args, NULL, 0); 177 if (rv != PR_SUCCESS) 178 { 179 rc = NS_ERROR_FAILURE; 180 break; 181 } 182 #else 183 const char *args[] = { VBoxSVCPath, "--automate", 0 }; 167 184 RTPROCESS pid = NIL_RTPROCESS; 168 const char *args[] = { VBoxSVCPath, "--automate", 0 };169 185 vrc = RTProcCreate (VBoxSVCPath, args, NULL, 0, &pid); 170 186 if (VBOX_FAILURE (vrc)) … … 173 189 break; 174 190 } 191 #endif 175 192 176 193 /* wait for the server process to establish a connection */
Note:
See TracChangeset
for help on using the changeset viewer.