microsoft / microsoft/Windows-classic-samples

Potential mistake in process creation flags

Open
#181 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
5.7k
Forks
3.3k
PR merge metrics
No merged PRs in 30d

Description

While reading https://docs.microsoft.com/en-us/windows/win32/procthread/process-creation-flags documentation and provided sample, I noticed that there is a potential mistake either in the sample or in the documentation.

For the CREATE_NEW_PROCESS_GROUP flag, the documentation states

This flag is ignored if specified with CREATE_NEW_CONSOLE.

The samples here and in the documentation have both flags set together, i.e.:
NORMAL_PRIORITY_CLASS | CREATE_NEW_CONSOLE | CREATE_NEW_PROCESS_GROUP,

What case is valid?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the process-creation-flags documentation with the referenced sample at Samples/ManagementInfrastructure/cpp/Process/Provider/WindowsProcess.c around line 770. First verify the documented behavior of CREATE_NEW_PROCESS_GROUP when combined with CREATE_NEW_CONSOLE, then determine which source is incorrect. Done means the valid flag combination and the correction target are clearly established.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.