The ability to automate interactive programs using libuv would be a killer feature, libuv could be used as a replacement for libexpect and node.js a replacement for expect :)
I imagine that beyond the system calls used to open the pty, there's not much difference between ptys and pipes from the programmer POV(at least on UNIX). If I managed to implement a UV_CREATE_TERMINAL spawn option by the end of next week, is there any chance it would make into 0.12? I'm particularly interested in this, since it's a feature Neovim could benefit from. The patch would include: - The UV_CREATE_TERMINAL option, which would use the `pty()` instead of `pipe()` on UNIX - A windows implementation(I would need to study winpty source code and adapt the solution to libuv) - A good set of tests On Thursday, July 24, 2014 10:08:17 AM UTC-3, Ben Noordhuis wrote: > > On Thu, Jul 24, 2014 at 12:48 PM, Thiago Arruda <[email protected] > <javascript:>> wrote: > > Hi > > > > Is it currently possible to use uv_spawn to open a terminal program? > > > > On UNIX it would probably require connecting the child process > > stdin/stdout/stderr to a pseudo-terminal(I have no idea how that works > on > > windows). > > > > If not supported natively by libuv(I think it's not since there's no > > UV_CREATE_PTY flag for uv_spawn), is there any workaround I can use? > > > > Thanks in advance > > I'm afraid not. You can make the child process inherit the parent > process's TTY but I suspect that is not what you want. > > There is an old feature request[0] for PTY support but (to the best of > my knowledge) no one has worked on it so far. > > [0] https://github.com/joyent/libuv/issues/573 > -- You received this message because you are subscribed to the Google Groups "libuv" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/libuv. For more options, visit https://groups.google.com/d/optout.
