From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from outgoing-yousee-3.gl-mut-gbl.as8677.net (outgoing-yousee-3.gl-mut-gbl.as8677.net [193.201.76.63]) by sourceware.org (Postfix) with ESMTPS id 075BE3864877 for ; Thu, 20 Aug 2020 05:40:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 075BE3864877 Received: from filter.yousee.as8677.net (localhost [94.147.60.30]) by mwumf0305.yousee.as8677.net (SMTP Server) with ESMTP id 4BXD5L4Xzqz1nj for ; Thu, 20 Aug 2020 07:40:38 +0200 (CEST) Received: from localhost.localdomain (unknown [94.147.60.30]) by mwumf0305.yousee.as8677.net (SMTP Server) with ESMTP id 4BXD5L40zhz1nG for ; Thu, 20 Aug 2020 07:40:38 +0200 (CEST) Received: from localhost.localdomain (unknown [94.147.60.30]) (Authenticated sender: donpedro@tdcadsl.dk) by mwumf0305.yousee.as8677.net (SMTP Server) with ESMTPA for ; Thu, 20 Aug 2020 07:40:38 +0200 (CEST) Message-ID: <1ae8de15bb74efb7207299d2dba92cdef88d9a94.camel@tdcadsl.dk> Subject: Re: Synchronization problem with posix_spawn From: Peter Dons Tychsen To: cygwin@cygwin.com Date: Thu, 20 Aug 2020 07:40:37 +0200 In-Reply-To: <20200803105004.GK460314@calimero.vinschen.de> References: <864b3031-9fc8-beb3-ba7c-1ade4c31a288@cornell.edu> <20200730115913.GL4206@calimero.vinschen.de> <20200730171723.GA460314@calimero.vinschen.de> <86051625-646d-065a-8543-1c3086411d3d@cornell.edu> <20200731081025.GB460314@calimero.vinschen.de> <9c44f4351d459a2ba8d27c65bf71679208cb13d6.camel@tdcadsl.dk> <20200803105004.GK460314@calimero.vinschen.de> User-Agent: Evolution 3.36.4 (3.36.4-1.fc32) MIME-Version: 1.0 X-yse-mailing: LEGIT X-yse-spamcause: OK, (0)(0000)gggruggvucftvghtrhhoucdtuddrgeduiedruddtledgjeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuvfffvedpggftfgfpufgfuefuveftkfeugfdpqfgfvfenuceurghilhhouhhtmecufedttdenucenucfjughrpefkuffhvfffjghftggfggfgsehtjeertddtreejnecuhfhrohhmpefrvghtvghrucffohhnshcuvfihtghhshgvnhcuoeguohhnphgvughrohesthgutggrughslhdrughkqeenucggtffrrghtthgvrhhnpedtiefggeeuudevkedvgeefueefiefhgeelvdekveeiieehffeitdekueeitdejffenucfkphepleegrddugeejrdeitddrfedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehhvghloheplhhotggrlhhhohhsthdrlhhotggrlhguohhmrghinhdpihhnvghtpeelgedrudegjedriedtrdeftddpmhgrihhlfhhrohhmpeguohhnphgvughrohesthgutggrughslhdrughkpdhrtghpthhtoheptgihghifihhnsegthihgfihinhdrtghomh Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, 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 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Aug 2020 05:40:42 -0000 Hi Corinna, > spawn alone doesn't cut it, due to the requirement to support the > additional file actions and spawn atributes POSIX defines. This > would require a revamp of Cygwin's spawn functionality, which is > already quite complicated. So this is something I'm only willing > to do in homeopathic doses. OK. I can see that most of the processing of the options are done seperately. We could to start with create a shortcut that calls spawn[vpe]() instead if there are no options specified? That would speed up most cases. Then we could add the extra cases later if needed. Would that be an acceptable patch? The reason i am pushing for this is that allot of developers i interact with get the feeling cygwin is slow. When i look into their cases it is almost always because they use programs that end up calling fork() allot (large shell scripts, makefiles, etc.). Almost all modern versions of these programs have support for calling posix_spawn() instead when creating processes, which would (if we changed it) speed up these cases dramatically if it avoided fork(). It would simply make cygwin more appealing to this group of users. Thanks, /pedro