Re: [msysGit] [PATCH] compat/mingw: stubs for getpgid() and tcgetpgrp()
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Apr 16, 2015, 12:44 UTC
- Message-ID
- <fac9a525a2fb2b09d176243659cbf3a7@www.dscho.org>
- In-Reply-To
- <CABPQNSZ-7FAgun8mxqXYWgy+Xc9xQMXKZonwujXb5WzLCKmNMw@mail.gmail.com>
Hi kusma,
On 2015-04-15 21:43, Erik Faye-Lund wrote:
Show 8 quoted lines
> On Wed, Apr 15, 2015 at 8:29 PM, Johannes Sixt <j6t@kdbg.org> wrote: >> Windows does not have process groups. It is, therefore, the simplest >> to pretend that each process is in its own process group. > > Windows does have some concept of process groups, but probably not > quite what you want: > > https://msdn.microsoft.com/en-us/library/windows/desktop/ms682083%28v=vs.85%29.aspx
Yes, and we actually need that in Git for Windows anyway because shooting down a process does not kill its child processes:
https://github.com/git-for-windows/msys2-runtime/commit/15f209511985092588b171703e5046eba937b47b#diff-8753cda163376cee6c80aab11eb8701fR402
However, using this code for `getppid()` would be serious overkill (not to mention an unbearable performance hit because you have to enumerate *all* processes to get that information).
Ciao, Dscho