fix: isolate subprocess stdin and decouple startup to prevent MCP stdio deadlocks
- Set stdin=subprocess.DEVNULL across runtime, client, and utility subprocess calls to avoid hijacking the parent process's stdin. - Run awake service initialization asynchronously on a daemon thread in MCP server startup. - Redirect logger header printing to stderr to ensure stdio JSON-RPC purity. - Add unit and lifecycle tests for MCP stdio protocol handshake and stdin isolation.
This commit is contained in:
1 parent
8fdecf23d7
commit
e984d17635
12 files changed
+237
-13
No files matched your search
@@ -168,9 +168,9 @@ class ArtemisLogger:
|
||||
colored_separator = f"{Fore.CYAN}{separator}{Style.RESET_ALL}"
|
||||
colored_message = f"{Fore.CYAN}{message}{Style.RESET_ALL}"
|
||||
|
||||
print(colored_separator)
|
||||
print(colored_message)
|
||||
print(colored_separator)
|
||||
print(colored_separator, file=sys.stderr)
|
||||
print(colored_message, file=sys.stderr)
|
||||
print(colored_separator, file=sys.stderr)
|
||||
self.logger.info(f"\n{separator}\n{message}\n{separator}")
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user