michaelmelanson / michaelmelanson/panda-os
Service manager step 1: Signal support (OP_PROCESS_SIGNAL)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Summary
Implement OP_PROCESS_SIGNAL for SIGKILL (kernel-level forced termination) and add a Signal::Terminate variant for message-based SIGTERM delivery via the HANDLE_PARENT channel.
This is step 1 of the service manager implementation (#26) and is also tracked separately as #24.
Details
- SIGKILL: The kernel immediately tears down the target process — reclaims memory, closes handles, unblocks waiters. No userspace code runs in the target.
- SIGTERM: Delivered as a
Signal::Terminatemessage on the process'sHANDLE_PARENTchannel. The process can catch and handle it gracefully (e.g., flush buffers, close connections).
Key files
panda-abi/src/lib.rs— addOP_PROCESS_SIGNALopcode,Signalenumpanda-kernel/src/syscall/— syscall handlerpanda-kernel/src/process/— forced termination logiclibpanda/src/sys/mod.rs— low-level wrapperlibpanda/src/process.rs—Process::kill(),Process::terminate()
Testing
- Kernel test: spawn, SIGKILL, verify termination and wait returns
- Kernel test: spawn, SIGTERM, verify message arrives on parent channel
- Userspace test: kill a looping child, verify clean exit
- Userspace test: kill a process with pending I/O, verify no deadlock
Documentation
- Doc comments on
OP_PROCESS_SIGNALopcode andSignalvariants - Update
docs/IPC.mdwith signal delivery semantics
Part of #26
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the opcode and Signal enum in panda-abi/src/lib.rs, then read the syscall handler and process code under panda-kernel/. Trace the low-level wrapper in libpanda/src/sys/mod.rs and the Process methods in libpanda/src/process.rs. Done means SIGKILL terminates and can be waited on, SIGTERM arrives through HANDLE_PARENT, the listed kernel and userspace tests pass, and the opcode, variants, and docs/IPC.md are documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100