You can later use fork() or the Spawn.async family of functions
to start a process on the PTY.
If using fork(), you MUST call Pty.childSetup in the child.
If using Spawn.async and friends, you MUST either use
Pty.childSetup directly as the child setup function, or call
Pty.childSetup from your own child setup function supplied.
When using Terminal.spawnSync with a custom child setup
function, Pty.childSetup will be called before the supplied
function; you must not call it again.
Also, you MUST pass the G_SPAWN_DO_NOT_REAP_CHILD flag.
Allocates a new pseudo-terminal.
You can later use fork() or the Spawn.async family of functions to start a process on the PTY.
If using fork(), you MUST call Pty.childSetup in the child.
If using Spawn.async and friends, you MUST either use Pty.childSetup directly as the child setup function, or call Pty.childSetup from your own child setup function supplied.
When using Terminal.spawnSync with a custom child setup function, Pty.childSetup will be called before the supplied function; you must not call it again.
Also, you MUST pass the G_SPAWN_DO_NOT_REAP_CHILD flag.