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

Unix: Fix argv[0] getting overwritten on launch #1183

Merged
merged 1 commit into from Nov 22, 2023

Conversation

Daggolin
Copy link
Contributor

@Daggolin Daggolin commented Nov 6, 2023

Calling Sys_Dirname on argv[0] lead to slashes in argv[0] getting overwritten on Linux (and potentially other non-Windows platforms), causing some external script to fail sending signals to the right process, because the path changed.

This pull request adjusts Sys_Dirname and Sys_Basename to work with a copy of the given string instead of the original. This makes the behavior of both functions more consistent between Windows and other platforms.

… Sys_Dirname. This prevents overwriting argv[0].
@Daggolin Daggolin requested a review from a team as a code owner November 6, 2023 22:42
Copy link

@bartrpe bartrpe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple and straightforward as hell

@ensiform ensiform merged commit 2ed26b3 into JACoders:master Nov 22, 2023
16 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

4 participants