Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: make proc_get_status compliant to OS documentation. #1403

Merged
merged 1 commit into from
Feb 15, 2024

Conversation

llmII
Copy link
Contributor

@llmII llmII commented Feb 13, 2024

As discused over gitter, WIFSIGNALED macro must be checked before one uses the WTERMSIG macro. This change reflects that necessity and adds a final else clause which will panic if no status code could be determined.

Also relevant is information gathered by @sogaiu in question-about-WTERMSIG-in-janet.md.

The idea here (currently, though it could be changed) is to panic when an unknown status code is encountered, as well as comply to the man 2 waitpid documentation.

As discused over gitter, `WIFSIGNALED` macro must be checked before one
uses the WTERMSIG macro. This change reflects that necessity and adds a
final else clause which will panic if no status code could be
determined.
@llmII llmII changed the title Fix: os/proc-wait Fix: make proc_get_status compliant to OS documentation. Feb 13, 2024
@bakpakin bakpakin merged commit 49eb5f8 into janet-lang:master Feb 15, 2024
8 checks passed
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.

None yet

2 participants