Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PTY integration #756

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from
Draft

PTY integration #756

wants to merge 18 commits into from

Conversation

KernelDeimos
Copy link
Contributor

PTY integration is somewhat working. There are a couple race conditions to narrow down and resize needs to be integrated.

I'll elaborate here because the commit name is confusing. Any time an
app gets a connection to another app, either because it launched that
app (or was launched by that app) or requested a connection to that app,
the ID the app gets to represent the app it's communicating with is now
a pseudo app id rather than the app instance ID. This accomplishes two
things:

1. It's more secure. There are multiple places where GUI assumes that
   knowing an app's instance ID means you can do things as that app.
2. Between the same two apps, there may now be more than one connection.
   This is useful for situations like Phoenix shell talking to the
   emulator in multiple separate instances to pipe commands. (this is
   coming later)
This involves establishing the protocol through which phoenix instances
run a command on the emulator. The pty is able to communicate with the
terminal in both directions. This commit adds logs to be removed later.

There are a few things left that this commit does not address:
- handling close of delegate process
- handling sigint from phoenix to delegate process
- closing the connection to twisp
Return to phoenix shell when a pty stream is closed by twisp.

Pipes in phoenix with commands from the emulator do not appear to be
working properly, but something in there is working.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant