michaelmelanson / michaelmelanson/panda-os

Service manager step 1: Signal support (OP_PROCESS_SIGNAL)

Open
#27 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement kernel syscall
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::Terminate message on the process's HANDLE_PARENT channel. The process can catch and handle it gracefully (e.g., flush buffers, close connections).

Key files

  • panda-abi/src/lib.rs — add OP_PROCESS_SIGNAL opcode, Signal enum
  • panda-kernel/src/syscall/ — syscall handler
  • panda-kernel/src/process/ — forced termination logic
  • libpanda/src/sys/mod.rs — low-level wrapper
  • libpanda/src/process.rsProcess::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_SIGNAL opcode and Signal variants
  • Update docs/IPC.md with signal delivery semantics

Part of #26

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.