| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
这是一个用来全面测试进程管理器行为的示例子进程。
cd ./childproc
GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=arm64 \
go build -ldflags='-s -w' -o childproc .Android 设备通常运行 arm64 架构;如果是 armv7 设备请改为 GOARCH=arm。
./childproc -mode normal -interval 1s -lifetime 10s
./childproc -mode crash -interval 500ms # 模拟崩溃退出(退出码=42)
./childproc -mode hang # 挂起,不退出,用于测试管理器超时/强杀
./childproc -mode graceful -lifetime 5s # 依赖信号优雅退出
./childproc -mode normal -state-file /tmp/counter # 重启计数写入文件-args "-mode crash -interval 200ms -message manager"| Back | FazBrowse Home | New Git URL |