X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3AD513893661
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1587734320;
	bh=CjROYgLJhqc2sL0CDvRcEKOoxu7xuyw0Jyw1o1+CePk=;
	h=To:References:In-Reply-To:Subject:Date:List-Id:List-Unsubscribe:
	 List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
	 From;
	b=lQQKjYoLAJcqq1k5J2VDw1ifWvdBQ12XOUHTtl64CxH1KjCTmL2hILAnDgdm8Q2BT
	 WGY+8lw3aS1XazeKH0lm+U0f2yNmRFoZa2LuYQ/333XYPIwRMYuSzoKJ8VWIGqdUOV
	 lXyL7jU0KMeKTis7917QNwPZffOX/EOeyu9Nfz6o=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 97926386EC42
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:references:in-reply-to:subject:date
 :message-id:mime-version:content-transfer-encoding:content-language
 :thread-index;
 bh=7zEyHfyMQ1UZHut9zHWiW+eEZ33CHRhvGmlZEly7+qg=;
 b=A4KTwCsURxej/PfdAuYgMkbg+iQWl3e6Ln21C6E9x8XqV6O38nZ4BoFmxE1jhHbXgy
 Sf9H+Zds/TQHFrSoeobU0uwqHrtW7xDbDjqmolaN4rXbYh0m7nvyaE9NkOz0CNI93Xfm
 Bs/GLezXNJ1k9N6Bn7AwgedfW2zTPX8dXoOyOic2OjjxI1x0B03Tkzc74rpMe6NcMJeY
 t/mbnGvoZun1B5ASRoPRPBHAAzFz/K+6KNBbOzCPADxhaFK3zk4YUM2ZnAIfvvbajV5M
 XW5fcubxo8tfx2tWS3lxKjMCggXxPUWHTa7yryGrZzN+zOxul0DGd2DzLvaslPsk0OPh
 42Xw==
X-Gm-Message-State: AGi0Pua3SZXF8aGSvIoS5X2v2HFXCvQQ5dzb1ivQIyng2oD3JQeSYBbG
 QlIPlif8QBGEcFB3XPR8Rhj/qym9
X-Google-Smtp-Source: APiQypJTXx+svRA5Nxzcyt7eagMvMiOLddsqtcyOSkdeptL+QbhzMc27Mp9X/vokpimd/gQkt23pxg==
X-Received: by 2002:ac2:4c89:: with SMTP id d9mr6413529lfl.165.1587734316043; 
 Fri, 24 Apr 2020 06:18:36 -0700 (PDT)
To: <cygwin@cygwin.com>
References: <008201d61a0a$328a5510$979eff30$@gmail.com>
 <94758478.20200424111042@yandex.ru>
In-Reply-To: <94758478.20200424111042@yandex.ru>
Subject: Sv: posix_spawnp creates ghost processes
Date: Fri, 24 Apr 2020 15:18:34 +0200
Message-ID: <000101d61a3a$dbe03e60$93a0bb20$@gmail.com>
MIME-Version: 1.0
X-Mailer: Microsoft Outlook 16.0
Content-Language: en-gb
Thread-Index: AQJzLlszbdq7FV+f3G2wMSynzw66gQD9zdCup0Yox9A=
X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00, DKIM_SIGNED,
 DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,
 SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
 server2.sourceware.org
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <http://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Kristian Ivarsson via Cygwin <cygwin@cygwin.com>
Reply-To: sten.kristian.ivarsson@gmail.com
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: "Cygwin" <cygwin-bounces@cygwin.com>

> Greetings, Kristian Ivarsson via Cygwin!
> 
> > We're having a rather complex application and have noticed a rather
> > weird behaviour that I cannot find any information about
> 
> > We're using posix_spawnp and sometimes it creates extra "ghost-
> process(es)"
> > non visible to cygwin (via e.g. process status (ps)) but visible to
> > Windows (Task Manager)
> 
> Cygwin may spawn processes for housekeeping. F.e. if you "program &" in
> shell, an additional shell will be spawned to launch the "program" and
> notify the parent shell when it exits.
> 
> > The function doesn't fail and it doesn't report any error, but
> > sometimes (hard to reproduce deterministically) it creates one, or
> > more, extra processes of the same binary
> 
> > Have anyone noticed and/or have some information/ideas about this ?
> 
> Are these processes correctly exit when all childs exit?

Well, no

The issue is that due to some other issue, the main program hangs in some
kind of blocking mode (don't know why yet)

I exit that with SIGINT (via console and Ctrl+C) and there are a few
processes running that were created by posix_spawnp according to the CygWin
TTY, but according to Windows, some of the processes are duplicated
processes

If I kill -9 them in CygWin, the ones not visible are still running
according to Windows Task Manager

> --
> With best regards,
> Andrey Repin
> Friday, April 24, 2020 11:08:35
> 
> Sorry for my terrible english...


--
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
