Skip to content

Restructure the README for a first-time reader - #38

Merged
orien merged 1 commit into
mainfrom
readme-restructure
Nov 30, 2026
Merged

orien merged 1 commit into
mainfrom
readme-restructure

Conversation

@orien

@orien orien commented Nov 29, 2026 •

Copy link
Copy Markdown
Member

Context

The README opens with install and one call, then goes straight into $? semantics and five bullets on interruption edge cases before it shows the options or the three methods. A reader with no context of the project can't follow the last of those bullets: "the cleanup" is never defined, "deferred interrupts" is never explained, and the timeout that interrupts a call has no stated source. It also leaves out things a caller needs, such as the empty stdin and what happens when a redirect file can't be opened.

PE-8869

Change

Reorders the README as pitch, install, usage, options, return value, and one section for failures and interruptions.

  • The failures section defines reaping and the cleanup once, and covers a command that can't be started, one reaped by something else, and an interrupted call.
  • Adds what a caller needs: the empty stdin, a background process keeping the call waiting, redirect files truncated before the program starts, secrets belonging in env:, the to_s conversion, and -- before user-supplied values.
  • Corrects facts: $? is a variable, "echo #{file}" is looked up as echo ;blah, only a command that changes its real user ID escapes the signals, and a trap handler can add a second to the cleanup.
  • Replaces "Developing" and "Status" with a one-line contributing note, and the copyright line with the licence name and a link to LICENSE.

Considerations

  • Where $? doesn't describe the command, the README says only that, without promising nil or the previous status: CRuby and TruffleRuby leave different values.
  • The README grows from 928 to 1,286 words, mostly the failure cases it didn't cover.

The README opened with install and one call, then went straight into
$? semantics and five bullets on interruption edge cases, before the
examples of the options and the three methods. A reader with no
context could not restate the last of those bullets: "the cleanup" was
never defined, "deferred interrupts" was never explained, and the
timeout that interrupts a call had no stated source.

Reorder it as pitch, install, usage, options, return value, then one
section for failures and interruptions. That section defines reaping
and the cleanup once, says that a second interruption is held until
the cleanup ends, and names the interruptions it covers.

Add what a caller needs and the README left out: the command reads an
empty stdin; a background process holding its output keeps the call
waiting; a redirect file that cannot be opened raises, and the files
are truncated before the program starts; secrets belong in env:, since
the exception message includes every argument; arguments go through
to_s; and a program may still read a user's value as an option.

Fix the facts on the way: $? is a variable, and a case that leaves it
not describing the command says so without promising nil or the
previous status, which differ between Rubies. The interpolated command
string is looked up as `echo ;blah`, only a command that changes its
real user ID escapes the signals, and the option Hash's values, not its
keys, choose the files and environment.

Replace "Developing" and "Status", which addressed an unnamed "I" and
cited an unnamed site, with a one-line contributing note, and the
copyright line, which disagreed with LICENSE, with the licence name.
@orien
orien force-pushed the readme-restructure branch from 884c4c6 to c09f4b4 Compare November 29, 2026 23:54
@orien
orien marked this pull request as ready for review November 30, 2026 00:05
@orien
orien merged commit 4f50ef9 into main Nov 30, 2026
16 checks passed
@orien
orien deleted the readme-restructure branch November 30, 2026 00:06
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.

1 participant