From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 51721 invoked by alias); 8 Feb 2019 16:18:07 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 51708 invoked by uid 89); 8 Feb 2019 16:18:07 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy= X-HELO: atfriesa01.ssi-schaefer.com Received: from atfriesa01.ssi-schaefer.com (HELO atfriesa01.ssi-schaefer.com) (193.186.16.100) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 08 Feb 2019 16:18:05 +0000 Received: from samail03.wamas.com (HELO mailhost.salomon.at) ([172.28.33.235]) by atfriesa01.ssi-schaefer.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Feb 2019 17:18:03 +0100 Received: from friw0839.wamas.com ([172.28.53.67]) by mailhost.salomon.at with esmtps (UNKNOWN:AES128-SHA:128) (Exim 4.77) (envelope-from ) id 1gs8qo-0005k1-K3; Fri, 08 Feb 2019 17:18:02 +0100 Subject: Re: [ANNOUNCEMENT] TEST: Cygwin 3.0.0-0.7 To: cygwin@cygwin.com References: <20190207182735.GG13951@calimero.vinschen.de> <8a2f041f-f8f7-6e17-5d97-5a168440009b@ssi-schaefer.com> <20190208113158.GH13951@calimero.vinschen.de> <17e339bb-2115-bf22-7291-04215aab3150@ssi-schaefer.com> <20190208122126.GM13951@calimero.vinschen.de> <20190208122338.GN13951@calimero.vinschen.de> <20190208130635.GO13951@calimero.vinschen.de> <20190208132807.GP13951@calimero.vinschen.de> <6b182191-b235-fcbb-5b25-66243950043c@ssi-schaefer.com> <20190208144827.GR13951@calimero.vinschen.de> From: Michael Haubenwallner Message-ID: <00970ac8-48e6-9776-e396-5ab78e55e61b@ssi-schaefer.com> Date: Fri, 08 Feb 2019 16:18:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <20190208144827.GR13951@calimero.vinschen.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-02/txt/msg00075.txt.bz2 On 2/8/19 3:48 PM, Corinna Vinschen wrote: > On Feb 8 15:43, Michael Haubenwallner wrote: >> On 2/8/19 2:28 PM, Corinna Vinschen wrote: >>> On Feb 8 14:06, Corinna Vinschen wrote: >>>> On Feb 8 13:52, Michael Haubenwallner wrote: >>>>> On 2/8/19 1:23 PM, Corinna Vinschen wrote: >>>>>> On Feb 8 13:21, Corinna Vinschen wrote: >>>>>>> On Feb 8 12:51, Michael Haubenwallner wrote: >>>>>>>> >>>>>>>> For now it seems like there's an inconsistency with PIDs: >>>>>>>> A first process PID 100, receives PID 101 from spawn(), >>>>>>>> but in the new process getpid() returns 102: >>>>>>>> >>>>>>>> $ ./dospawn /bin/bash -c 'echo $$' >>>>>>>> 12625 >>>>>>>> waitpid: pid 12624 status 0x0 >>>>>>> >>>>>>> Oh, hmm. If you call spawnve, rather than execve, a new child pid >>>>>>> is generated in spawnve, rather than just keeping the callers pid. >>>>>>> >>>>>>> However, apparently the child invents its own pid in pinfo::thisproc >>>>>>> after being spawned. But actually this should only occur for forked >>>>>>> processes aore processes started from non-Cygwin parents. >>>>>> >>>>>> Does that help, by any chance: >>>>>> [nope] >>>>> >>>>> How should the child be informed at all about the new cygpid value generated in >>>>> parent's child_info_spawn::worker() ? >>>> >>>> I just realized this myself. The old method creating Cygwin pids just >>>> fetched the pid from GetCurrentProcessId(), which was right for spawned >>>> (but not execed) processes. For the new pid we might have to give this >>>> to the child via child_info_spawn. >>> >>> This works for me, can you test this, too, please? >> >> Looks good to me as well, I'm going to start my hours running use case now. > > Sounds good, thanks. I'll push this change now. We can always > rework it if it's insufficient. *** WARNING WARNING WARNING WARNING WARNING *** *** .../newlib-cygwin/winsup/cygwin/child_info.h: magic number for CHILD_INFO_MAGIC changed old 0x3ee00652U != new 0xf4531879U *** WARNING WARNING WARNING WARNING WARNING *** Seems like the CHILD_INFO_MAGIC bump is missing for this change, no? /haubi/ -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple