mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
Add support for opening an existing PTY
Virtual machine monitor programs (e.g. QEMU, Cloud Hypervisor) expose guest consoles as PTYs. With this patch, foot can access these guest consoles. Usually, the program used for accessing these PTYs is screen, but screen is barely developed, doesn't support resizing, and has a bunch of other unrelated stuff going on. It would be nice to have a terminal emulator that properly supported opening an existing PTY. The VMM controls the master end of the PTY, so to the other end (in this case foot), it just behaves like any application running in a directly-opened PTY, and all that's needed is to change foot's code to support opening an existing PTY rather than creating one. Co-authored-by: tanto <tanto@ccc.ac>
This commit is contained in:
parent
712bc95db3
commit
86894a1cd2
9 changed files with 76 additions and 32 deletions
2
server.c
2
server.c
|
|
@ -332,7 +332,7 @@ fdm_client(struct fdm *fdm, int fd, int events, void *data)
|
|||
instance->terminal = term_init(
|
||||
conf != NULL ? conf : server->conf,
|
||||
server->fdm, server->reaper, server->wayl, "footclient", cwd, token,
|
||||
cdata.argc, argv, (const char *const *)envp,
|
||||
NULL, cdata.argc, argv, (const char *const *)envp,
|
||||
&term_shutdown_handler, instance);
|
||||
|
||||
if (instance->terminal == NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue