Commit graph

4 commits

Author SHA1 Message Date
Leroy Hopson
bea5d1c27d
Check if baton FuncRef is valid before calling call_funcv()
Often when closing a terminal in the terminal panel the error message
'Condition "!obj" is true.' would be printed to console.

This was due to the call_funcv() method being called on an invalid
FuncRef instance (invalid because it had already been deleted or queued
for delection).

Now we check the instance is valid before calling the method.
2022-07-11 09:33:00 +12:00
Leroy Hopson
0dd2378387 Add new PTY node (replaces Pseudoterminal node)
Uses fork of node-pty native code for forking pseudoterminals.
Uses libuv pipe handle to communicate with the child process.

- Paves the way for cross-platform (Linux, macOS and Windows) support.
- Renames Pseudoterminal to PTY (which is much easier to type and spell :D).
- Better performance than the old Pseudoterminal node. Especially when
  streaming large amounts of data such as running the `yes` command.
- Allows setting custom file, args, initial window size, cwd, env vars
  (including important ones such as TERM and COLORTERM) and uid/gid
  on Linux and macOS.
- Returns process exit code and terminating signal.
2021-07-03 14:56:27 +07:00
Leroy Hopson
4e6715329a Clang-format node-pty files 2021-07-03 14:56:27 +07:00
Leroy Hopson
9c20579bc6 Add original files from the node-pty project
Taken from <https://github.com/microsoft/node-pty>.
See the LICENSE.md file added in this commit for license and copyright
information.
2021-07-03 14:56:27 +07:00