Changeset 10651 in vbox
- Timestamp:
- Jul 15, 2008 12:31:56 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxGuest.h
r10635 r10651 1485 1485 VBGLR3DECL(int) VbglR3WriteLog(const char *pch, size_t cb); 1486 1486 VBGLR3DECL(int) VbglR3CtlFilterMask(uint32_t fOr, uint32_t fNot); 1487 VBGLR3DECL(int) VbglR3Daemonize( 1488 #ifdef __cplusplus 1489 bool fNoChDir, 1490 bool fNoClose, 1491 char const *pszPidfile = NULL 1492 #else 1493 bool fNoChDir, 1494 bool fNoClose, 1495 char const *pszPidfile 1496 #endif 1497 ); 1487 VBGLR3DECL(int) VbglR3Daemonize(bool fNoChDir, bool fNoClose, char const *pszPidfile); 1498 1488 VBGLR3DECL(int) VbglR3SetGuestCaps(uint32_t fOr, uint32_t fNot); 1499 1489 -
trunk/src/VBox/Additions/x11/xclient/main.cpp
r9791 r10651 25 25 #include <iprt/initterm.h> 26 26 #include <iprt/path.h> 27 #include <iprt/stream.h> 27 28 28 29 #include <sys/types.h> … … 45 46 #endif 46 47 47 #define TRACE printf("%s: %d\n", __PRETTY_FUNCTION__, __LINE__); Log(("%s: %d\n", __PRETTY_FUNCTION__, __LINE__))48 #define TRACE RTPrintf("%s: %d\n", __PRETTY_FUNCTION__, __LINE__); Log(("%s: %d\n", __PRETTY_FUNCTION__, __LINE__)) 48 49 49 50 static int (*gpfnOldIOErrorHandler)(Display *) = NULL; … … 139 140 /** Disable seamless mode */ 140 141 VbglR3SeamlessSetCap(false); 141 printf(("VBoxClient: terminating...\n"));142 RTPrintf(("VBoxClient: terminating...\n")); 142 143 /* don't call VbglR3Term() here otherwise the /dev/vboxadd filehandle is closed */ 143 144 /* Our pause() call will now return and exit. */ … … 173 174 void vboxClientUsage(const char *pcszFileName) 174 175 { 175 printf("Usage: %s [-d|--nodaemon]\n", pcszFileName); 176 printf("Start the VirtualBox X Window System guest services.\n\n"); 177 printf("Options:\n"); 178 printf(" -d, --nodaemon do not lower privileges and continue running as a system\n"); 179 printf(" service\n"); 176 RTPrintf("Usage: %s [-d|--nodaemon]\n", pcszFileName); 177 RTPrintf("Start the VirtualBox X Window System guest services.\n\n"); 178 RTPrintf("Options:\n"); 179 RTPrintf(" -d, --nodaemon do not lower privileges and continue running as a system\n"); 180 RTPrintf(" service\n"); 181 RTPrintf("\n"); 180 182 exit(0); 181 183 } … … 193 195 pszFileName = "VBoxClient"; 194 196 197 /* Initialise our runtime before all else. */ 198 RTR3Init(false); 199 195 200 /* Parse our option(s) */ 196 201 /** @todo Use RTGetOpt() if the arguments become more complex. */ … … 206 211 else 207 212 { 208 printf("%s: unrecognized option `%s'\n", pszFileName, argv[i]);209 printf("Try `%s --help' for more information\n", pszFileName);213 RTPrintf("%s: unrecognized option `%s'\n", pszFileName, argv[i]); 214 RTPrintf("Try `%s --help' for more information\n", pszFileName); 210 215 exit(1); 211 216 } … … 213 218 if (fDaemonise) 214 219 { 215 rc = VbglR3Daemonize(false /* fNoChDir */, false /* fNoClose */); 220 rc = VbglR3Daemonize(false /* fNoChDir */, false /* fNoClose */, 221 NULL); 216 222 if (RT_FAILURE(rc)) 217 223 { 218 printf("VBoxClient: failed to daemonize. exiting."); 224 RTPrintf("VBoxClient: failed to daemonize. exiting.\n"); 225 #ifdef DEBUG 226 RTPrintf("Error %Rrc\n", rc); 227 #endif 219 228 return 1; 220 229 } 221 230 } 222 /* Initialise our runtime before all else. */ 223 RTR3Init(false); 231 /* Initialise the guest library. */ 224 232 if (RT_FAILURE(VbglR3Init())) 225 233 { 226 printf("Failed to connect to the VirtualBox kernel service");234 RTPrintf("Failed to connect to the VirtualBox kernel service\n"); 227 235 return 1; 228 236 } … … 233 241 if (!XInitThreads() || !XtToolkitThreadInitialize()) 234 242 { 235 LogRel(("VBoxClient: error initialising threads in X11, exiting. "));243 LogRel(("VBoxClient: error initialising threads in X11, exiting.\n")); 236 244 return 1; 237 245 }
Note:
See TracChangeset
for help on using the changeset viewer.