WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 2, 2025

Addressed feedback on #490 regarding the execv P/Invoke signature. After review, the current implementation is correct:

  • argv convention: Array ["/bin/sh", tempScript, null!] properly follows execv semantics—first element is program name, followed by arguments, null-terminated
  • P/Invoke marshalling: .NET correctly marshals string[] to the native char* argv[] including the null terminator
[DllImport("libc", SetLastError = true)]
private static extern int execv(string path, string[] argv);

var argv = new[] { "/bin/sh", tempScript, null! };
var result = execv("/bin/sh", argv);

No code changes required—the bot reviewer's concerns were unfounded.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Update stdin/stdout I/O errors fix for macOS/Linux Confirm execv P/Invoke implementation is correct Dec 2, 2025
Copilot AI requested a review from ajpinedam December 2, 2025 20:38
Base automatically changed from fix/unix.relaunch.inputs to main December 3, 2025 17:04
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