From mboxrd@z Thu Jan 1 00:00:00 1970 From: rupert thurner Subject: Re: [PATCH] compat/mingw: stubs for getpgid() and tcgetpgrp() Date: Thu, 23 Apr 2015 12:25:49 -0700 (PDT) Message-ID: References: <20150413134850.GC23475@mewburn.net> <20150413144039.GD23475@mewburn.net> <20150414110312.GE23475@mewburn.net> <552EAE0A.3040208@kdbg.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_240_610169509.1429817149053" Cc: nico@fluxnic.net, git-owner@vger.kernel.org, rupert.thurner@gmail.com, git@vger.kernel.org, j6t@kdbg.org, luke@mewburn.net, kusmabite@gmail.com To: msysgit@googlegroups.com X-From: msysgit+bncBCBO3N6S34BRBPMO4WUQKGQEH2AQV3I@googlegroups.com Thu Apr 23 21:25:51 2015 Return-path: Envelope-to: gcvm-msysgit@m.gmane.org Received: from mail-yh0-f62.google.com ([209.85.213.62]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YlMkw-0004Np-Nr for gcvm-msysgit@m.gmane.org; Thu, 23 Apr 2015 21:25:50 +0200 Received: by yhzz6 with SMTP id z6sf7096063yhz.0 for ; Thu, 23 Apr 2015 12:25:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=date:from:to:cc:message-id:in-reply-to:references:subject :mime-version:content-type:x-original-sender:precedence:mailing-list :list-id:list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe; bh=CD09MvNie7AJqLxS4l5fL6g5vTRoUVxbz24aktlc1V0=; b=OfpoYfn3XUODm8emxCcImb8ZNVybhIUlCeiZE5RQiVhStHNstMXBls4Icz2YMCOwVB FWQm8Fqeqy3rbyvFngMFEL6PsiLASi7gl+PbC5B71UXtIdlQA96pXkhWqmS0sI7UYLTJ x7TNBO8OZ97nE1VdH/Oes9n6niDYCqAzs5RpLj5eA29fe8AFwoU9kqTDX92BwmIwk+WP KWYUa/X3bLcWyaPIyLP9J3Ej0Uy5DLSkIT6y73QPbTjiZHfGao39YpXozDKOaBM34a1v f+j0iFpDnKXA+j+xegcfzeW36BCyyW6aS8DnE2bCSmDv1YasSDg1SUW+wqvDAsZpm/92 xC7g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:message-id:in-reply-to:references:subject :mime-version:content-type:x-original-sender:precedence:mailing-list :list-id:list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe; bh=CD09MvNie7AJqLxS4l5fL6g5vTRoUVxbz24aktlc1V0=; b=nU4+QgLTnl1lsfreHGniDhS0FqbvoH+q+OIwM82aGBOoAn74uwtCH8sc7sRbd1l+ZO +mKULjkvCj6nbfaIAxlnEUamczJoM4PVhmSHhbRn33AoZlH0glwJ0Ci+K24Xe5ERoRA9 dMC/rL/9klOJ+d8rs0Oze9zvTYXmF0LHMuG/wWMgwNh7Jz8nxGvJVNdtSfxssRRsEpZO Wis0+cqF9rJQQnyXtmfhawkqN3SsuCJRb9cYOzw1Vrbzh9jxpYvYuL7VIXsyVNZ2jVFH dKHv+Rgc0qrXosRRlqleOnl47kAucAUu308VHti3aW1zusX7uWy2f/GdGYdQ7hBK3CLc PLGA== X-Received: by 10.140.98.116 with SMTP id n107mr71565qge.11.1429817149965; Thu, 23 Apr 2015 12:25:49 -0700 (PDT) X-BeenThere: msysgit@googlegroups.com Received: by 10.140.41.83 with SMTP id y77ls1328867qgy.88.gmail; Thu, 23 Apr 2015 12:25:49 -0700 (PDT) X-Received: by 10.140.41.164 with SMTP id z33mr77858qgz.21.1429817149498; Thu, 23 Apr 2015 12:25:49 -0700 (PDT) In-Reply-To: X-Original-Sender: rupert.thurner@gmail.com Precedence: list Mailing-list: list msysgit@googlegroups.com; contact msysgit+owners@googlegroups.com List-ID: X-Google-Group-Id: 152234828034 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Archived-At: ------=_Part_240_610169509.1429817149053 Content-Type: multipart/alternative; boundary="----=_Part_241_884523338.1429817149053" ------=_Part_241_884523338.1429817149053 Content-Type: text/plain; charset=UTF-8 On Thursday, April 16, 2015 at 2:45:11 PM UTC+2, Johannes Schindelin wrote: > > Hi kusma, > > On 2015-04-15 21:43, Erik Faye-Lund wrote: > > On Wed, Apr 15, 2015 at 8:29 PM, Johannes Sixt > 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). > > is the windows "JobObject" similar to processgroup? at least killing the parent process in a jobobject will kill all childs as well: https://msdn.microsoft.com/en-us/library/windows/desktop/ms681949%28v=vs.85%29.aspx best, rupert -- -- *** Please reply-to-all at all times *** *** (do not pretend to know who is subscribed and who is not) *** *** Please avoid top-posting. *** The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free. You received this message because you are subscribed to the Google Groups "msysGit" group. To post to this group, send email to msysgit@googlegroups.com To unsubscribe from this group, send email to msysgit+unsubscribe@googlegroups.com For more options, and view previous threads, visit this group at http://groups.google.com/group/msysgit?hl=en_US?hl=en --- You received this message because you are subscribed to the Google Groups "Git for Windows" group. To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout. ------=_Part_241_884523338.1429817149053 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Thursday, April 16, 2015 at 2:45:11 PM UTC+2, Johannes = Schindelin wrote:
Hi kusma,

On 2015-04-15 21:43, Erik Faye-Lund wrote:
> On Wed, Apr 15, 2015 at 8:29 PM, Johannes Sixt <j...@kdbg.org> wrote:
>> Windows does not have process groups. It is, therefore, the si= mplest
>> to pretend that each process is in its own process group.
>=20
> Windows does have some concept of process groups, but probably not
> quite what you want:
>=20
> https://msdn.microsoft.com/en-us/library/win= dows/desktop/ms682083%28v=3Dvs.85%29.aspx

Yes, and we actually need that in Git for Windows anyway because shooti= ng down a process does not kill its child processes:

https://github.com/git-for-windows/msys2-runtime= /commit/15f209511985092588b171703e5046eba937b47b#diff-8753cd= a163376cee6c80aab11eb8701fR402

However, using this code for `getppid()` would be serious overkill (not= to mention an unbearable performance hit because you have to enumerate *al= l* processes to get that information).


is the windows "JobObject" similar= to processgroup? at least killing the parent process in a jobobject will k= ill all childs as well:
https://msdn.microsoft.com/en-us/library/= windows/desktop/ms681949%28v=3Dvs.85%29.aspx 

best,
rupert
 

--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.<= br />  
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http:= //groups.google.com/group/msysgit?hl=3Den_US?hl=3Den

---
You received this message because you are subscribed to the Google Groups &= quot;Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to msysgit+uns= ubscribe@googlegroups.com.
For more options, visit http= s://groups.google.com/d/optout.
------=_Part_241_884523338.1429817149053-- ------=_Part_240_610169509.1429817149053--