Skip to content

Avoid allocating in pre_exec closure#33

Merged
MaxVerevkin merged 1 commit intoMaxVerevkin:masterfrom
purplesyringa:pre-exec
Nov 21, 2025
Merged

Avoid allocating in pre_exec closure#33
MaxVerevkin merged 1 commit intoMaxVerevkin:masterfrom
purplesyringa:pre-exec

Conversation

@purplesyringa
Copy link
Contributor

Error::other allocates memory (see rust-lang/rust#148971) and thus isn't async-signal-safe. last_os_error is. It isn't possible to transmit the error message across pre_exec, unless you're willing to write to stderr, but the old method swallowed the text too, so hopefully that isn't a problem.

@MaxVerevkin
Copy link
Owner

Thanks!

@MaxVerevkin MaxVerevkin merged commit 9fcf5ba into MaxVerevkin:master Nov 21, 2025
4 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.

2 participants