From 9eccc225f93f1db5c07eb41d3f7378bba4b3b347 Mon Sep 17 00:00:00 2001 From: Siyuan Date: Tue, 18 Nov 2025 12:11:43 +0000 Subject: [PATCH] chore: add README.md for native process debugging --- internal/native/README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/internal/native/README.md b/internal/native/README.md index a02976e4..97a2cf79 100644 --- a/internal/native/README.md +++ b/internal/native/README.md @@ -3,4 +3,18 @@ This component (`internal/native/`) acts as a bridge between Golang and native (C/C++) code. It manages spawning and communicating with a native process via sockets (gRPC and Unix stream). -For performance-critical operations such as video frame, **a dedicated Unix socket should be used** to avoid the overhead of gRPC and ensure low-latency communication. \ No newline at end of file +For performance-critical operations such as video frame, **a dedicated Unix socket should be used** to avoid the overhead of gRPC and ensure low-latency communication. + +## Debugging + +To enable debug mode, create a file called `.native-debug-mode` in the `/userdata/jetkvm` directory. + +```bash +touch /userdata/jetkvm/.native-debug-mode +``` + +This will cause the native process to listen for SIGHUP signal and crash the process. + +```bash +pgrep native | xargs kill -SIGHUP +``` \ No newline at end of file