Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • O OSKernel2026-StellaOS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • StellaOS
  • OSKernel2026-StellaOS
  • Merge requests
  • !53

pipe: fix poll missing POLLIN on EOF, causing ppoll hang in busybox sh pipelines

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged StellaOS requested to merge fix_make into main Jun 11, 2026
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 2

Two fixes in os/src/pipe.rs:

  1. PipeReceiver::poll: when pipe is empty and all writers are gone, return POLLIN|POLLHUP (was only POLLHUP). POSIX requires POLLIN because read() returns 0 (EOF) without blocking. Busybox ash's read builtin uses ppoll to wait for POLLIN before reading the next byte — without POLLIN on EOF, ppoll blocked forever after the last line.

  2. Drop for PipeSender/PipeReceiver: when the last writer closes, signal write_wait to wake blocked readers; when the last reader closes, signal read_wait to wake blocked writers. Without these, a reader blocked on an empty pipe would sleep forever if the writer exited without writing more data.

Root cause of busybox-musl test hang: cat | while read loop never exited because ash's ppoll(fd=0, POLLIN) returned 0 events on EOF pipe, causing the shell to block instead of calling read() to get EOF.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix_make