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

Use library function to get exitcode from status #3331

Closed
wants to merge 1 commit into from

Conversation

tback
Copy link

@tback tback commented Nov 28, 2024

Shifting by 8 bits will hide the correct exit code in some cases.

On linux sending SIGKILL will produce the log entry.

Worker (pid:22) was sent SIGKILL! Perhaps out of memory

The logline printing the exitcode is not triggered because shifting the status will zero it.

The patched version using os.waitstatus_to_exitcode produces.

Worker (pid:7) exited with code -9
Worker (pid:7) was sent SIGKILL! Perhaps out of memory?

Yes, this is a minute detail. I discovered it when investigating #3330.

Shifting by 8 bits will hide the correct exit code in some cases.
@pajod
Copy link
Contributor

pajod commented Nov 28, 2024

Broader refactor (not using that 3.9+ method, but using its os.W* steps) awaiting review over here: #3148

@tback
Copy link
Author

tback commented Nov 29, 2024

thanks, closing in favor of #3148

@tback tback closed this Nov 29, 2024
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.

2 participants