Move pts to rust, and avoid using thread

This commit is contained in:
LoveSy
2025-04-11 13:21:10 -07:00
committed by John Wu
parent b8f1523fb2
commit c4847ed288
7 changed files with 141 additions and 402 deletions
+1 -5
View File
@@ -20,8 +20,6 @@
#include <flags.h>
#include <core.hpp>
#include "pts.hpp"
using namespace std;
#define DEFAULT_SHELL "/system/bin/sh"
@@ -241,9 +239,7 @@ int su_client_main(int argc, char *argv[]) {
if (atty) {
setup_sighandlers(sighandler);
watch_sigwinch_async(STDOUT_FILENO, ptmx);
pump_stdin_async(ptmx);
pump_stdout_blocking(ptmx);
pump_stdin_stdout(ptmx, ptmx);
}
// Get the exit code