-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
ProcessStartInfo.Arguments follows Windows conventions on all platforms #29857
Comments
@CoffeeFlux for 3.0 this is by design and we do not intend to change this behavior at this point (too close to ship date). For Future we can start a conversation on how to make both Windows and Linux users happy (will have to add new APIs if needed). I'd recommend to list what behaviors do you think should be changed (in a table) and what would be implications of that for Windows and Linux users and based on that we can decide what to do going forward. |
Speaking personally, I think the managed API here is too Windows-centric, and as part of .NET 5 we should be looking to accomplish two main things:
In general, it would be nice to have fundamental questions like this tracked somewhere, but that's well outside my domain. I've pinged the Mono BCL team about this issue and hopefully one of them can take a look and share their thoughts/come up with a more formal proposal. |
That already exists. |
Ah okay, I guess I was looking at Framework documentation by accident, my bad. That should work well for Unix users, though it seems inconsistent on whether Arguments or ArgumentList takes priority depending on platform with the reverse of what I'd actually expect; Windows seems to prefer ArgumentList while Unix prefers Arguments. https://github.com/dotnet/corefx/blob/41f0787f93d6c51baf3cd90b39b6e572ce5c6582/src/System.Diagnostics.Process/src/System/Diagnostics/Process.Win32.cs#L52-L61 https://github.com/dotnet/corefx/blob/007571b90c3cc555cd30f3b467b87c22f9f665e0/src/System.Diagnostics.Process/src/System/Diagnostics/Process.Unix.cs#L596-L603 I think my second point still more or less stands. |
My thoughts (as you requested IMHO, I think it must always be the Windows behavior for |
This issue can be closed. As explained above, this behavior is intentional. |
Related issue in Mono: mono/mono#14724
It seems that currently in .NET Core, ProcessStartInfo.Arguments follows Windows argument conventions on all platforms. As shown in the linked issue, this leads to significant differences in common scenarios, single quotes being an easy example.
I wanted to open this issue to clarify whether that is intended, or if there's any chance of Core using POSIX shell conventions on platforms when appropriate. I'm somewhat concerned that Mono customers depend on the current behavior, which is what I would personally expect to see on non-Windows platforms, but I don't know how similar platform differences are typically handled in Core. If following Windows conventions on all platforms is intentional, we'll figure out how to deal with that along with existing applications, but I wanted to clarify/see if there's any chance for a change here.
The text was updated successfully, but these errors were encountered: