Replace the "tty" driver with a "pty" driver.

This new driver uses the "generic" TTY layer, unlike the old driver
which had its own implementation (which the generic module was derived
from, originally.)

The remaining bits of support for controlling TTYs is added to the kernel &
generic layer at the same time, which should allow for serial interfaces
to be controlling terminals now, as well.

Tested with bash, nano, vim; all seems to still be working as expected.
This commit is contained in:
Augustin Cavalier
2023-05-09 16:04:09 -04:00
parent 7a27ef1439
commit 0c2a5bb5ea
7 changed files with 609 additions and 16 deletions
+3 -3
View File
@@ -47,9 +47,9 @@ thread_id load_image_etc(int32 argCount, const char* const* args,
void team_set_job_control_state(Team* team, job_control_state newState,
Signal* signal);
void team_set_controlling_tty(int32 index);
int32 team_get_controlling_tty();
status_t team_set_foreground_process_group(int32 ttyIndex, pid_t processGroup);
void team_set_controlling_tty(void* tty);
void* team_get_controlling_tty();
status_t team_set_foreground_process_group(void *tty, pid_t processGroup);
uid_t team_geteuid(team_id id);
status_t start_watching_team(team_id team, void (*hook)(team_id, void *),
+1 -2
View File
@@ -638,8 +638,7 @@ private:
struct ProcessSession : BReferenceable {
pid_t id;
int32 controlling_tty; // index of the controlling tty,
// -1 if none
void* controlling_tty;
pid_t foreground_group;
public: