Chromium Code Reviews
Description[Chromoting] Reimplement the worker process launcher to address issues with job control and launching of elevated processes.
This CL makes three changes:
1. We create a new job object every time we launch a worker into a new session, under Vista and above. This addresses the limitation that a job object used with processes from one session cannot later be re-used to manage processes from a different session.
2. We launch and manage worker processes directly on XP/W2K3, without a job object. We don't need a job object since these platforms don't support/need elevation anyway. This addresses the limitation that processes created via CreateRemoteSessionProcess() cannot be assigned to a job object.
3. We allow WorkerProcessLauncher instances to be dropped synchronously from the caller's perspective; the class takes care of asynchronous tear-down tasks transparently. This addresses a race condition in tear-down of old worker processes and creation of new ones arising from delayed session change notifications.
The new layout assigns the following responsibilities:
- WorkerProcessLauncher is used to manage a worker process, taking care of setting up the IPC channel, and re-launching it w/ exponential back-off. It supports fire-and-forget tear-down.
- WorkerProcessLauncher defers launch & termination to a caller-supplied Delegate, responsible for launching the process as the caller requires.
- Our current "single-process" service launches the host process via WtsConsoleSessionProcessDriver, which tracks which session is currently attached to the console and uses WtsSessionProcessDelegate instances to have WorkerProcessLauncher re-launch the host into the new console session whenever it is switched. WtsSessionProcessDelegate takes care of OS-version-specific process management tasks.
- Our experimental "multi-process" service launches the host's network process, undependent of session lifetimes, by passing an UnprivilegedProcessDelegate to WorkerProcessLauncher. This launches the host process in the same session as the caller.
BUG=153005, 148781, 149098
TEST=remoting_unittests.WorkerProcessLauncherTest
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=161140
Patch Set 1 #
Total comments: 13
Patch Set 2 : CR feedback. #
Total comments: 81
Patch Set 3 : CR feedback. #Patch Set 4 : Count the worker exiting too such as a failure. #
Total comments: 4
Patch Set 5 : rebased #Messages
Total messages: 10 (0 generated)
|