FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Use managed APIs for Unix startup metadata by lbussell · Pull Request #28337 · PowerShell/PowerShell · GitHub

Repository navigation

Use managed APIs for Unix startup metadata - #28337

Draft
Logan Bussell (lbussell) wants to merge 1 commit into
PowerShell:masterfrom
lbussell:lbussell/managed-unix-startup-metadata
Draft

Logan Bussell (lbussell) wants to merge 1 commit into
PowerShell:masterfrom
lbussell:lbussell/managed-unix-startup-metadata

Conversation

Copy link
Copy Markdown

PR Summary

Replace Unix login-shell startup P/Invokes for process metadata with managed .NET APIs while preserving the existing native calls required by direct process replacement and macOS argument inspection.

PR Context

.NET 11 already provides the Linux executable path and current process ID through behavior-equivalent managed APIs. This PR uses those APIs and removes the obsolete readlink and getpid declarations. It retains setenv because Environment.SetEnvironmentVariable updates the managed Unix environment cache, not the native libc environment inherited by the existing execv call, and retains execv and macOS sysctl because no equivalent managed APIs preserve the startup behavior.

PR Checklist

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

microsoft-github-policy-service Bot added the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Nov 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL