Skip to content

Clarify documentation of Process.Start return value #10664

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

Open
tmat opened this issue Oct 31, 2024 · 2 comments
Open

Clarify documentation of Process.Start return value #10664

tmat opened this issue Oct 31, 2024 · 2 comments
Labels
area-System.Diagnostics.Process documentation help wanted Good for community contributors to help [up-for-grabs] Pri3 Indicates issues/PRs that are low priority
Milestone

Comments

@tmat
Copy link
Member

tmat commented Oct 31, 2024

Description

Current documentation:

The return value true indicates that a new process resource was started. If the process resource specified by the FileName member of the StartInfo property is already running on the computer, no additional process resource is started. Instead, the running process resource is reused and false is returned.

This is generally not true. If UseShellExecute is false (or on Unix where UseShellExecute is ignored), Start will never return false.
If UseShellExecute is true Start may return false if a new process isn't created... as the ShellExecuteEx docs call out:

hProcess will be NULL if no process was launched. For example, if a document to be launched is a URL and an instance of Internet Explorer is already running, it will display the document. No new process is launched, and hProcess will be NULL.

Reproduction Steps

n/a

Expected behavior

n/a

Actual behavior

n/a

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Oct 31, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-diagnostics-process
See info in area-owners.md if you want to be subscribed.

@jeffhandley jeffhandley added documentation needs-further-triage and removed untriaged New issue has not been triaged by the area owner labels Nov 3, 2024
@jeffhandley jeffhandley transferred this issue from dotnet/runtime Nov 9, 2024
@issues-automation issues-automation bot added the Pri3 Indicates issues/PRs that are low priority label Nov 9, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Nov 9, 2024
@jeffhandley jeffhandley added this to the Backlog milestone Nov 9, 2024
@dotnet-policy-service dotnet-policy-service bot removed the untriaged New issue has not been triaged by the area owner label Nov 9, 2024
@jeffhandley jeffhandley added the help wanted Good for community contributors to help [up-for-grabs] label Nov 9, 2024
@DanaIzadpanah
Copy link

I got this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Diagnostics.Process documentation help wanted Good for community contributors to help [up-for-grabs] Pri3 Indicates issues/PRs that are low priority
Projects
None yet
Development

No branches or pull requests

3 participants