Changeset 47475 in vbox for trunk/src/VBox/Additions/common/VBoxService
- Timestamp:
- Jul 30, 2013 2:18:02 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlProcess.cpp
r46513 r47475 718 718 { 719 719 fProcessAlive = false; 720 continue; 721 } 722 if (RT_UNLIKELY(rc2 == VERR_INTERRUPTED)) 723 continue; 724 if (RT_UNLIKELY(rc2 == VERR_PROCESS_NOT_FOUND)) 725 { 726 fProcessAlive = false; 727 ProcessStatus.enmReason = RTPROCEXITREASON_ABEND; 728 ProcessStatus.iStatus = 255; 729 AssertFailed(); 720 /* Note: Don't bail out here yet. First check in the next block below 721 * if all needed pipe outputs have been consumed. */ 730 722 } 731 723 else 732 AssertMsg(rc2 == VERR_PROCESS_RUNNING, ("%Rrc\n", rc2)); 724 { 725 if (RT_UNLIKELY(rc2 == VERR_INTERRUPTED)) 726 continue; 727 if (RT_UNLIKELY(rc2 == VERR_PROCESS_NOT_FOUND)) 728 { 729 fProcessAlive = false; 730 ProcessStatus.enmReason = RTPROCEXITREASON_ABEND; 731 ProcessStatus.iStatus = 255; 732 AssertFailed(); 733 } 734 else 735 AssertMsg(rc2 == VERR_PROCESS_RUNNING, ("%Rrc\n", rc2)); 736 } 733 737 } 734 738 … … 737 741 * we should be heading out. 738 742 */ 739 if ( !fProcessAlive 740 && *phStdOutR == NIL_RTPIPE 741 && *phStdErrR == NIL_RTPIPE) 742 { 743 VBoxServiceVerbose(3, "[PID %RU32]: All pipes closed, process not alive anymore, bailing out ...\n", 744 pProcess->uPID); 745 break; 743 if (!fProcessAlive) 744 { 745 if ( fProcessTimedOut 746 || ( *phStdOutR == NIL_RTPIPE 747 && *phStdErrR == NIL_RTPIPE) 748 ) 749 { 750 break; 751 } 746 752 } 747 753 … … 757 763 if (cMsElapsed >= pProcess->StartupInfo.uTimeLimitMS) 758 764 { 759 VBoxServiceVerbose(3, "[PID %RU32]: Timed out (%RU 32ms elapsed > %RU32ms timeout), killing ...\n",765 VBoxServiceVerbose(3, "[PID %RU32]: Timed out (%RU64ms elapsed > %RU64ms timeout), killing ...\n", 760 766 pProcess->uPID, cMsElapsed, pProcess->StartupInfo.uTimeLimitMS); 761 767 … … 766 772 if (u64Now - MsProcessKilled > 20*60*1000) 767 773 break; /* Give up after 20 mins. */ 768 RTProcTerminate(hProcess); 774 rc2 = RTProcTerminate(hProcess); 775 VBoxServiceVerbose(3, "[PID %RU32]: Killing process resulted in rc=%Rrc\n", 776 pProcess->uPID, rc2); 769 777 MsProcessKilled = u64Now; 770 778 continue; … … 784 792 } 785 793 786 VBoxServiceVerbose(2, "[PID %RU32]: Process loop ended with rc=%Rrc\n", 787 pProcess->uPID, rc); 794 VBoxServiceVerbose(3, "[PID %RU32]: Loop ended: fShutdown=%RTbool, fProcessAlive=%RTbool, fProcessTimedOut=%RTbool, MsProcessKilled=%RU32\n", 795 pProcess->uPID, pProcess->fShutdown, fProcessAlive, fProcessTimedOut, MsProcessKilled, MsProcessKilled); 796 VBoxServiceVerbose(3, "[PID %RU32]: *phStdOutR=%s, *phStdErrR=%s\n", 797 pProcess->uPID, *phStdOutR == NIL_RTPIPE ? "closed" : "open", *phStdErrR == NIL_RTPIPE ? "closed" : "open"); 788 798 789 799 /* Signal that this thread is in progress of shutting down. */
Note:
See TracChangeset
for help on using the changeset viewer.