Skip to content

Treat a job as suspended when any child process suspends#144

Merged
magicant merged 1 commit into
trunkfrom
any-process-suspend
Mar 27, 2025
Merged

Treat a job as suspended when any child process suspends#144
magicant merged 1 commit into
trunkfrom
any-process-suspend

Conversation

@magicant

Copy link
Copy Markdown
Owner

POSIX.1-2024 requires that the shell treat a job as suspended when any child process comprising the job suspends. Previously, the shell considered a job to be suspended only when all child processes comprising the job suspended. This change makes the shell compliant with the standard.

Fixes #130


This pull request includes various changes related to job control behavior in the shell, documentation updates, and test adjustments. The most important changes include modifications to how the shell handles suspended jobs, updates to documentation in multiple languages, and the addition of new test cases.

Changes to job control behavior:

  • Modified the shell to consider a job as suspended when any child process in a pipeline suspends, instead of waiting for all child processes to suspend (job.c).

Documentation updates:

  • Updated the NEWS file to reflect the change in job suspension behavior.
  • Updated the Japanese NEWS.ja file with the corresponding change.
  • Revised the English and Japanese job control documentation to align with the new behavior (doc/job.txt, doc/ja/job.txt). [1] [2]

Test adjustments:

  • Added new test cases to ensure the shell considers a job suspended when any child process suspends (tests/job-y.tst).
  • Reorganized the test suite to include job control tests under a new section in tests/POSIX.

@magicant magicant added this to the 2.59 milestone Mar 26, 2025
@magicant magicant self-assigned this Mar 26, 2025
@magicant
magicant force-pushed the any-process-suspend branch 2 times, most recently from fec1fec to ecdecbc Compare March 27, 2025 14:46
POSIX.1-2024 requires that the shell treat a job as suspended when any
child process comprising the job suspends. Previously, the shell
considered a job to be suspended only when all child processes
comprising the job suspended. This change makes the shell compliant
with the standard.

Fixes #130
@magicant
magicant force-pushed the any-process-suspend branch from ecdecbc to ab61acd Compare March 27, 2025 15:09
@magicant
magicant merged commit 2ac2860 into trunk Mar 27, 2025
@magicant
magicant deleted the any-process-suspend branch March 27, 2025 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Treat a job suspended when any of its component processes is suspended

1 participant