Skip to content

Commit

Permalink
Clarify that ProcessStartInfo.UseShellExecute does not mean bash (#436)
Browse files Browse the repository at this point in the history
* Clarify that ProcessStartInfo.UseShellExecute does not mean bash

The property name is very confusing on unix-like platforms. Anyone
familiar with unix-like platforms will probably assume it means
/bin/bash or /bin/sh. Clarify that it does not mean that shell and that
it refers to the conecpt of shell on Windows, which is closer in meaning
to "desktop".

For an example of this tripping up users, see:
dotnet/core#1857. For more on the
cross-platform inconsistencies of UseShellExecute, see
https://github.com/dotnet/corefx/issues/24704

* Update ProcessStartInfo.xml
  • Loading branch information
omajid authored and Ron Petrusha committed Sep 26, 2018
1 parent a3c3a88 commit 1df1371
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion xml/System.Diagnostics/ProcessStartInfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1478,6 +1478,8 @@ p.WaitForExit();
Setting this property to `false` enables you to redirect input, output, and error streams.
The word "shell" in this context (`UseShellExecute`) refers to a graphical shell (similar to the Windows shell) rather than command shells (for example, `bash` or `sh`) and lets users launch graphical applications or open documents.
> [!NOTE]
> <xref:System.Diagnostics.ProcessStartInfo.UseShellExecute> must be `false` if the <xref:System.Diagnostics.ProcessStartInfo.UserName> property is not `null` or an empty string, or an <xref:System.InvalidOperationException> will be thrown when the <xref:System.Diagnostics.Process.Start(System.Diagnostics.ProcessStartInfo)?displayProperty=nameWithType> method is called.
Expand Down Expand Up @@ -1811,4 +1813,4 @@ When <xref:System.Diagnostics.ProcessStartInfo.UseShellExecute> is `false`, the
</Docs>
</Member>
</Members>
</Type>
</Type>

0 comments on commit 1df1371

Please sign in to comment.