delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/06/27/17:13:28

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 55RLDSak1589908
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 55RLDSak1589908
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=lQBO7Q93
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A9889385C406
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1751058807;
bh=z3AzjbwTFy9ZGUH83CjUWU7LZUNqTrWgKIF70tsIiWw=;
h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:
List-Help:List-Subscribe:From:Reply-To:From;
b=lQBO7Q93GG0xlxMiKsIhUuIH7o1Ga+fWFSD68eD4kJkNGw9aSJvupqsfTjjpwunf5
pGJ1zOJdcu5zPvhwj6OJvwrozJg55/jXofpZymfGlgcJ8Z8zrafFD7dWbC8DWG1B6V
MBwKQkIDbp4qVF35jdwx3HnlO6ifOjK4XQcb61Ro=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 396DE3858408
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 396DE3858408
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1751058749; cv=none;
b=egCn7JlyNQrEathWjFJrkM06pki2fLjtIgE3TEVAHs4araknDgvpUTNovLMdQyKjNy6aNLuJ8E6xNwgIw48eXvC+k8+KQjEuYysYzG0oV9xy6BkIZsTarxPE0fef5pp9+e7TeQ9ckC/jQLk6U1tYFuPm+9Yi5lZxzLrRnb33Kvk=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1751058749; c=relaxed/simple;
bh=dQZ/9HpIbKtMN7MOdT8kXLIBJVxxJWweRS898FUwhEU=;
h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version;
b=rVPVkWS0Ia2Qd6gEOjjbZJnBIe0po7vi4l6ZYwdDfr87XNLrZA1MGAgsYrPFNOkxVVsVxSVmWnxf/oab10vo8JuXD/Es4p7aNeJeaqcwH4TIbI+0E1anzy5KTvX5Rsp1a7e8g2sE3DKf8bQ3fnDY95ZNkphg46tTqaQdEW6y2P0=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 396DE3858408
Date: Fri, 27 Jun 2025 14:12:28 -0700 (PDT)
X-X-Sender: jeremyd AT resin DOT csoft DOT net
To: cygwin AT cygwin DOT com
Subject: Question about PID_NEW_PG in child_info_spawn::worker
Message-ID: <5d8d18c6-fa74-e236-1fbf-e2ff2246e3e5@jdrake.com>
MIME-Version: 1.0
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Jeremy Drake via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Jeremy Drake <cygwin AT jdrake DOT com>
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>

I've been poking around in child_info_spawn lately, and I've noticed
commit 8d8724ee1b5aa6a1b080c76a0dec3678136d4981 ("Cygwin: pty: Fix Ctrl-C
handling further for non-cygwin apps.") added the following (it's since
been revised to an InterlockedOr, but that's not relevant to my question):

      if (c_flags & CREATE_NEW_PROCESS_GROUP)
	myself->process_state |= PID_NEW_PG;

My question is, if mode != _P_OVERLAY, shouldn't that flag be set on the
child's pinfo rather than myself?  It seems the child's pinfo isn't
created until after the CreateProcess though.  If that is the case, maybe
the myself->set_has_pgid_children () call needs to only be called if that
flag is not (going to be) set?

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019