Skip to content

Conversation

@straight-shoota
Copy link
Member

@straight-shoota straight-shoota commented Oct 27, 2025

Reduces code executing between fork and exec. Most importantly, removes the unsafe allocation from command_args.map.

@straight-shoota straight-shoota self-assigned this Oct 27, 2025
@straight-shoota straight-shoota added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib:system platform:unix labels Oct 27, 2025
@straight-shoota straight-shoota force-pushed the refactor/argv-before-fork branch from ff168ee to 8924397 Compare October 28, 2025 08:50
@ysbaddaden ysbaddaden added this to the 1.19.0 milestone Oct 28, 2025
@ysbaddaden
Copy link
Contributor

Now I'm confused with command and prepared_args 😵

@straight-shoota
Copy link
Member Author

prepared_args are the exact arguments to execvp, i.e. already transformed to C types.
command is usually the same value as prepared_args[1][0], but as a String instead of a C string (UInt8*).

Actually, it should probably better be LibC::Char*.

@straight-shoota straight-shoota removed this from the 1.19.0 milestone Oct 29, 2025
@straight-shoota straight-shoota added this to the 1.19.0 milestone Oct 31, 2025
@straight-shoota straight-shoota merged commit 6f69506 into crystal-lang:master Nov 1, 2025
40 checks passed
@straight-shoota straight-shoota deleted the refactor/argv-before-fork branch November 1, 2025 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:bug A bug in the code. Does not apply to documentation, specs, etc. platform:unix topic:stdlib:system

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants