Improve socket handling for -x spawned fenrir instances.

This commit is contained in:
Storm Dragon
2026-05-07 23:24:54 -04:00
parent 0273f9b956
commit 8638bca1d5
53 changed files with 794 additions and 1072 deletions
@@ -254,9 +254,6 @@ class driver(screenDriver):
# Load configurable timeouts from settings
self._load_pty_settings()
self.shortcutType = self.env["runtime"][
"InputManager"
].get_shortcut_type()
self.env["runtime"]["ProcessManager"].add_custom_event_thread(
self.terminal_emulation
)
@@ -403,31 +400,23 @@ class driver(screenDriver):
}
)
break
if self.shortcutType == "KEY":
try:
self.inject_text_to_screen(msg_bytes)
except Exception as e:
self.env["runtime"][
"DebugManager"
].write_debug_out(
"ptyDriver getInputData: Error injecting text to screen: "
+ str(e),
debug.DebugLevel.ERROR,
)
event_queue.put(
{
"Type": FenrirEventType.stop_main_loop,
"data": None,
}
)
break
else:
try:
self.inject_text_to_screen(msg_bytes)
except Exception as e:
self.env["runtime"][
"DebugManager"
].write_debug_out(
"ptyDriver getInputData: Error injecting text to screen: "
+ str(e),
debug.DebugLevel.ERROR,
)
event_queue.put(
{
"Type": FenrirEventType.byte_input,
"data": msg_bytes,
"Type": FenrirEventType.stop_main_loop,
"data": None,
}
)
break
# output
if self.p_out in r:
try: