It does exactly what you want. the screen will work inside the terminal device, so if (I assume you are connected to Linux) you want to create it programmatically, you need to configure the terminal pseudowire device using posix_openpt()
, configure the slave device using grantpt()/unlockpt()
, expanding, opening the slave pty in the child process, duplicating it on stdin / out / err and, finally, the execution screen with the corresponding parameters. Now you can send commands and receive notifications about terminals, as if you were a terminal emulator. See the pty(7)
page for more information; I am pretty sure I missed some of them.
All this is a huge mess and almost certainly too complicated for what you are trying to do. So: what are you really trying to do?
source share