On 01/03/2016 03:47 PM, John Wiegley wrote: >>>>>> Daniel Colascione writes: > >> If implementing a scheme like this is what it takes to kill the stack >> overflow code, I think I can implement it. > > Even if we don't kill the stack overflow code, would you be interested in > trying out your async spawn idea? That might have other useful applications > too. In fact, I've wanted to move async.el's ideas into the C level for a > while (to avoid text-based marshalling between parent and child Emacsen), and > this could dovetail beautifully with that desire... How would moving to C help? Keep in mind that we're talking about fork *and exec*, so the parent and child don't share memory. They can, however, communicate over a pipe. Lisp already has read and print, so given the choice, I'd rather implement cross-process functionality in Lisp. Sure, that's text-based marshaling, but with it's general, isn't it? They only difficulty I have in mind is making sure that the child Emacs can display UI to the user, which involves matching window-system parameters like DISPLAY. That said, if we do end up implementing async-spawn, and we need to be able to do it from C *anyway*, we can certainly expose that C functionality to regular Lisp callers.