How to create a pseudo-tty for reading output and writing to input

前端 未结 3 1503
北荒
北荒 2020-12-17 01:48

I am using fork() and execvp() to spawn a process that must believe it is connected to an interactive terminal for it to function properly.

Once spawned, I want to

3条回答
  •  失恋的感觉
    2020-12-17 02:15

    There's a package called "expect" which you should use. It uses a scripting language called tcl (pronounced tickle).

    https://core.tcl-lang.org/expect/

提交回复
热议问题