- Timestamp:
- Apr 18, 2016 9:24:40 AM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 106656
- Location:
- trunk/src/VBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/linux/vboxweb-service.sh
r58326 r60532 168 168 killproc $binary 169 169 RETVAL=$? 170 # Be careful: wait 1 second, making sure that everything is cleaned up. 171 sleep 1 170 172 if ! pidof $binary > /dev/null 2>&1; then 171 173 rm -f $PIDFILE -
trunk/src/VBox/Installer/solaris/smf-vboxwebsrv.sh
r56299 r60532 125 125 # Kill service contract 126 126 smf_kill_contract $2 TERM 1 127 # Be careful: wait 1 second, making sure that everything is cleaned up. 128 smf_kill_contract $2 TERM 1 127 129 ;; 128 130 *) -
trunk/src/VBox/Main/webservice/vboxweb.cpp
r60513 r60532 908 908 g_pSoapQ = new SoapQ(&soap); 909 909 910 for (uint64_t i = 1; g_fKeepRunning; i++) 911 { 910 uint64_t cAccepted = 1; 911 while (g_fKeepRunning) 912 { 913 struct timeval timeout; 914 fd_set fds; 915 int rv; 916 for (;;) 917 { 918 timeout.tv_sec = 60; 919 timeout.tv_usec = 0; 920 FD_ZERO(&fds); 921 FD_SET(soap.master, &fds); 922 rv = select((int)soap.master + 1, &fds, &fds, &fds, &timeout); 923 if (rv > 0) 924 break; // work is waiting 925 else if (rv == 0) 926 continue; // timeout, not necessary to bother gsoap 927 else // r < 0, errno 928 { 929 if (soap_socket_errno(soap.master) == SOAP_EINTR) 930 rv = 0; // re-check if we should terminate 931 break; 932 } 933 } 934 if (rv == 0) 935 continue; 936 912 937 // call gSOAP to handle incoming SOAP connection 913 soap.accept_timeout = 10;938 soap.accept_timeout = -1; // 1usec timeout, actual waiting is above 914 939 s = soap_accept(&soap); 915 940 if (!soap_valid_socket(s)) … … 923 948 // pick up the job 924 949 size_t cItemsOnQ = g_pSoapQ->add(s); 925 LogRel(("Request %llu on socket %d queued for processing (%d items on Q)\n", i, s, cItemsOnQ)); 950 LogRel(("Request %llu on socket %d queued for processing (%d items on Q)\n", cAccepted, s, cItemsOnQ)); 951 cAccepted++; 926 952 } 927 953 … … 1321 1347 #else 1322 1348 signal(SIGINT, websrvSignalHandler); 1349 signal(SIGTERM, websrvSignalHandler); 1323 1350 # ifdef SIGBREAK 1324 1351 signal(SIGBREAK, websrvSignalHandler); … … 1346 1373 #else 1347 1374 signal(SIGINT, SIG_DFL); 1375 signal(SIGTERM, SIG_DFL); 1348 1376 # ifdef SIGBREAK 1349 1377 signal(SIGBREAK, SIG_DFL); … … 1351 1379 #endif 1352 1380 1381 RTThreadPoke(threadQPumper); 1353 1382 RTThreadWait(threadQPumper, 30000, NULL); 1354 1383 if (threadWatchdog != NIL_RTTHREAD) 1384 { 1385 RTThreadPoke(threadWatchdog); 1355 1386 RTThreadWait(threadWatchdog, g_iWatchdogCheckInterval * 1000 + 10000, NULL); 1387 } 1356 1388 1357 1389 /* VirtualBoxClient events unregistration. */
Note:
See TracChangeset
for help on using the changeset viewer.