systemd / systemd/systemd

systemctl --status should return 0 if unit exit code is in SuccessExitStatus

Open
#1,816 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

RFE 🎁 systemctl
Dominant language
C
Stars
16.7k
Forks
4.7k
Avg merge
1d 6h
Merged PRs (30d)
140

Description

When a oneshot unit exits with error code 2 and that SuccessExitStatus contains 2, systemctl status should ideally return 0.

Contributor guide

Open the contributing guide

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

Reproduce the case with a oneshot unit that exits with status 2 and declares SuccessExitStatus=2, then trace how systemctl status determines its return code. Done means status returns 0 when the unit's exit code is listed as successful, while preserving existing behavior for other exit codes.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
cli, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.