[lldb-dev] Process spawning and shutdown

Todd Fiala tfiala at google.com
Tue Sep 16 12:07:39 PDT 2014


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).

Also, ProcessGDBRemote is capable of kicking those off if it's using
gdb-remote locally.

So, if nothing else, there's the concept of a "launch via another
mechanism."

On Tue, Sep 16, 2014 at 11:55 AM, Zachary Turner <zturner at google.com> wrote:

> 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:
>
> MacOSX:
>     * Applescript
>     * XPC
>     * posix_spawn
>
> Other posix variants:
>     * posix_spawn
>
> Windows:
>     * Native windows launcher
>
>
> Among these, there are a couple of different ways to reap processes on
> exit and/or "join" on them.  These are:
>
> MacOSX:
>     * Applescript    [ No process reaping or monitoring occurs. ]
>     * XPC               [ Uses MacOSX-specific dispatch library for
> monitoring ]
>     * posix_spawn [ Uses MacOSX-specific dispatch library for monitoring ]
>
> Other posix variants:
>     * posix_spawn   [ Launches a background thread to monitor for process
> exit, join on the thread to join on the process ]
>
> Windows:
>     * Native windows launcher  [ WaitForSingleObject ]
>
> A few questions:
>
> 1) Is Join() on a process a useful operation that people would be
> interested in seeing implemented for all platforms?
>
> 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?
>
> 3) Speaking of the Applescript launcher, what is it and what is it used
> for?
>
>
> I'll probably have more questions as I wrap my head around this a little
> more.  Thanks
>
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
>
>


-- 
Todd Fiala | Software Engineer | tfiala at google.com | 650-943-3180
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20140916/42b7d953/attachment.html>


More information about the lldb-dev mailing list