Python: when to use pty.fork() versus os.fork()

前端 未结 3 1149
别跟我提以往
别跟我提以往 2021-02-05 14:52

I\'m uncertain whether to use pty.fork() or os.fork() when spawning external background processes from my app. (Such as chess engines)

I want t

3条回答
  •  误落风尘
    2021-02-05 14:59

    Pseudotermials are necessary for some applications that really expect a terminal. An interactive shell is one of these examples but there are many other. The pty.fork option is not there as another os.fork but as a specific API to use a pseudoterminal.

提交回复
热议问题