<div dir="ltr">I'm going to tackle implementing process monitoring for Windows next, and I've started going over how this works for other platforms.<div><br></div><div>There's a bit of a confusing interaction between Host, Target, and the individual plugins, and I'm wondering if it might make more sense to put the monitoring code somewhere other than Host.</div><div><br></div><div>From what I can tell, launching a process for debugging goes something like this:</div><div><br></div><div>1) Call ProcessPlugin::DoLaunch</div><div>2) some system calls to actually launch the process</div><div>3) Call Host::StartMonitoringChildProcess with callback set to somewhere in your plugin.</div><div>4) The monitoring thread (in Host) periodically calls back into ProcessPlugin</div><div><br></div><div>For starters, this seems to be broken in the case where the ProcessLaunchInfo has pre-set an m_monitor_callback because the plugins end up just ignoring this and using their own callback.</div><div><br></div><div>Ultimately, how a process is monitored is going to depend on the plugin, so shouldn't StartMonitoringChildProcess also be part of the plugin?  In what situation would you ever want to monitor a child process that is not under the control of some process plugin?</div></div>