Is it possible to output on multiple terminal windows within a single C program?

后端 未结 1 778
悲&欢浪女
悲&欢浪女 2021-01-13 03:32

Basically what I\'d like to do is have two output terminal windows for a single program. One would be displaying a log of actions being taken by the program, and the second

1条回答
  •  -上瘾入骨i
    2021-01-13 04:06

    Not in any portable way, but on Linux, /dev/pts is a directory containing all of the open ttys, so writing to a few diferent /dev/pts/ files would put output on multiple terminals.

    0 讨论(0)
提交回复
热议问题