Changeset 49531 in vbox
- Timestamp:
- Nov 18, 2013 1:09:24 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxService.cpp
r49511 r49531 754 754 { 755 755 RTEXITCODE rcExit; 756 bool fUserSession = false; 756 757 757 758 /* … … 778 779 #endif 779 780 781 #ifdef VBOX_WITH_GUEST_CONTROL 782 /* 783 * Check if we're the specially spawned VBoxService.exe process that 784 * handles a guest control session. 785 */ 786 if ( argc >= 2 787 && !RTStrICmp(argv[1], "guestsession")) 788 fUserSession = true; 789 #endif 790 780 791 /* 781 792 * Connect to the kernel part before daemonizing so we can fail and … … 784 795 * do to some initial stuff with it. 785 796 */ 786 VBoxServiceVerbose(2, "Calling VbgR3Init()\n"); 787 rc = VbglR3Init(); 797 if (fUserSession) 798 { 799 VBoxServiceVerbose(2, "Calling VbgR3InitUser()\n"); 800 rc = VbglR3InitUser(); 801 } 802 else 803 { 804 VBoxServiceVerbose(2, "Calling VbgR3Init()\n"); 805 rc = VbglR3Init(); 806 } 788 807 if (RT_FAILURE(rc)) 789 808 { … … 799 818 * handles page fusion. This saves an extra executable. 800 819 */ 801 if ( 802 && 820 if ( argc == 2 821 && !RTStrICmp(argv[1], "pagefusion")) 803 822 return VBoxServicePageSharingInitFork(); 804 823 #endif … … 809 828 * handles a guest control session. 810 829 */ 811 if ( argc >= 2 812 && !RTStrICmp(argv[1], "guestsession")) 830 if (fUserSession) 813 831 return VBoxServiceControlSessionForkInit(argc, argv); 814 832 #endif
Note:
See TracChangeset
for help on using the changeset viewer.