- proper tostring method
- added va_end() in _lpty_error
- fixed 2 potential memory leaks where the result of realloc was ignored
- fixed memory leak in _lpty_execvpe
- added checks for first argument in lpty_[gs]etenviron
- fixed a bug where lpty:readline() could have returned an error if the read from the pty just returned 0. Bug discovered and fix provided by Robert Kumpulainen firstname.lastname@example.org
- small change to timeout handling
- verified lua 5.3 compatibility
- added pty:setflag() method
- make the newly created pty the controlling terminal for the
created session, contributed by Ard van Breemen email@example.com
- added separate_stderr option for pty creation, together with
the readerr() and geterrfd() methods.
- small fix to luarocks file
- terminals can now be set to raw mode
- added a simple expect() method.
- added readline() method to read a single line from the pty
- added getflags() method to retrieve the flags the pty was created
- changed option parsing for lpty.new, so that invalid options will
be recognized as such
- added getfd method to retrieve the file descriptor of the
pty’s master side. This has been contributed by Matthew Wild
(mwild1 at gmail dot com).
His rationale, which I can completely get behind, is this:
Having the method name ‘getfd’ is good, as it makes
the pty objects compatible with LuaSocket objects. This means
you can pass the pty directly to socket.select()! (it probably
works with LuaEvent too, but I haven’t tested).
I have tested it with luaposix’ poll() and that works fine.
- changed signal handling to use sigaction() instead of signal()
- does not register a global table “lpty” on loading any more,
because it is now…
- 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
- 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
- PTYs can now be created such that the client side does not
echo what the server side sends.
- Error handling has been made to comply with the usual lua way,
returning nil+error in case of an error. The old behavious can
be reinstated by a switch when creating a pty.
- readok() and sendok() can now take timeout values.
- child process now properly dies when setsid() fails.