lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

If there was a pty:getfd() method, it could be possible to multiplex master ptys using ?


PS: This trick allow passing io.stdin to

getmetatable ( io.stdin ).getfd = function(fh)
        if fh == io.stdin then return 0 end

On 02. april 2013 09:14, "Gunnar Zötl" wrote:

this message is to announce the availability of lpty 1.0. lpty is a simple
interface to pty functionality, providing the ability to fork a process and run
it under pty control. It does not try to mimic the posix API but instead focuses
on the function of running and controlling a program.

New since version 0.9:

- does not register a global table "lpty" on loading any more, because it is
- compatible with lua 5.1 and 5.2
- new exitstatus() method, which can provide information about why a child
process terminated
- new flush() method, that removes unwanted data from the pty
- custom environments for processes, and 2 new methods to deal with those
- an option on pty creation time to start child processes using the contents of
the PATH environment variable - or not
- the makefile has been made somewhat more usable
- the documentation has received a makeover

You can get lpty from

or via luarocks install lpty.