chore: add README.md for native process debugging

This commit is contained in:
Siyuan 2025-11-18 12:11:43 +00:00
parent ddce62438c
commit 9eccc225f9
1 changed files with 15 additions and 1 deletions

View File

@ -4,3 +4,17 @@ This component (`internal/native/`) acts as a bridge between Golang and native (
It manages spawning and communicating with a native process via sockets (gRPC and Unix stream). 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. 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
```