Changeset 4100 in vbox
- Timestamp:
- Aug 9, 2007 5:13:24 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/linux/server.cpp
r4071 r4100 991 991 992 992 /* nothing to do here, the process is supposed to be already 993 * started daemonized when it is necessary */ 993 * started daemonized when it is necessary */ 994 994 NOREF(fDaemonize); 995 995 … … 1047 1047 printf("ERROR: setsid() failed (errno = %d)\n", errno); 1048 1048 return 1; 1049 } 1050 1051 /* Need to do another for to get rid of the session leader status. 1052 * Otherwise any accidentally opened tty will automatically become a 1053 * controlling tty for the daemon process. */ 1054 childpid = fork(); 1055 if (childpid == -1) 1056 { 1057 printf("ERROR: second fork() failed (errno = %d)\n", errno); 1058 return 1; 1059 } 1060 1061 if (childpid != 0) 1062 { 1063 /* we're the parent process, just a dummy so terminate now */ 1064 exit(0); 1049 1065 } 1050 1066
Note:
See TracChangeset
for help on using the changeset viewer.