<div dir="ltr">Don't forget we also have launching via Platform classes, which can end up kicking off a gdb-remote request to a lldb-platform or gdb-remote stub (llgs/debugserver).<div><br></div><div>Also, ProcessGDBRemote is capable of kicking those off if it's using gdb-remote locally.</div><div><br></div><div>So, if nothing else, there's the concept of a "launch via another mechanism."</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 16, 2014 at 11:55 AM, Zachary Turner <span dir="ltr"><<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The last major piece of the Host layer I'd like to address is process launching and cleanup. From looking over the code it seems we have the following different ways to launch a process:<div><br></div><div>MacOSX:</div><div> * Applescript</div><div> * XPC</div><div> * posix_spawn</div><div><br></div><div>Other posix variants:</div><div> * posix_spawn</div><div><br></div><div>Windows:</div><div> * Native windows launcher</div><div><br></div><div><br></div><div>Among these, there are a couple of different ways to reap processes on exit and/or "join" on them. These are:</div><div><br></div><div><div>MacOSX:</div><div> * Applescript [ No process reaping or monitoring occurs. ]</div><div> * XPC [ Uses MacOSX-specific dispatch library for monitoring ]</div><div> * posix_spawn [ Uses MacOSX-specific dispatch library for monitoring ]</div><div><br></div><div>Other posix variants:</div><div> * posix_spawn [ Launches a background thread to monitor for process exit, join on the thread to join on the process ]</div><div><br></div><div>Windows:</div><div> * Native windows launcher [ WaitForSingleObject ]</div></div><div><br></div><div>A few questions: </div><div><br></div><div>1) Is Join() on a process a useful operation that people would be interested in seeing implemented for all platforms?</div><div><br></div><div>2) On Linux at least, if you don't waitpid() on a process you'll end up with zombies. It seems this is true on MacOSX as well, because I see waitpid() in StartMonitoringChildProcess. Is this not true for the Applescript launcher? Why doesn't the Applescript launching code path call StartMonitoringChildProcess() anywhere?</div><div><br></div><div>3) Speaking of the Applescript launcher, what is it and what is it used for?</div><div><br></div><div><br></div><div>I'll probably have more questions as I wrap my head around this a little more. Thanks</div></div>
<br>_______________________________________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><table cellspacing="0" cellpadding="0" style="color:rgb(136,136,136);font-family:'Times New Roman'"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small"><td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Todd Fiala |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tfiala@google.com" style="color:rgb(17,85,204)" target="_blank"><span style="background-color:rgb(255,255,204);color:rgb(34,34,34);background-repeat:initial initial">tfiala@google.com</span></a> |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"><font color="#1155cc"> <a>650-943-3180</a></font></td></tr></tbody></table><br></div>
</div>