DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 51HA9gpn2874689 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 51HA9gpn2874689 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=ucoKg3H/ X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DAECD3858404 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1739786981; bh=0E5yC4BnUp+yArW4OivWmmR7kX9pq+iWNbdQWHEAcFM=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=ucoKg3H/9C3cN/4rGdbIrV83+g81fTy60Od1jYHjF3UpSgCO96fTHx8eUW8V9qB1s 4QIzAPN1b6tOXXCP42nrDf0CPrA1lAkynNQGfseNBhbtSJ3PGY8vl3EGePZqnGOmyx 52qFohqMtMGXmyDSWupkqViZfXcTHCiLOkkWkico= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DF3063858C50 Date: Mon, 17 Feb 2025 11:08:16 +0100 To: cygwin AT cygwin DOT com, cygwin-patches AT cygwin DOT com Subject: Re: WinAPI spawn() not used by Cygwin posix_spawn()? Re: [PATCH] Cygwin: Add spawn family of functions to docs Message-ID: Mail-Followup-To: cygwin AT cygwin DOT com, cygwin-patches AT cygwin DOT com References: <20250216214657 DOT 2303-1-mark AT maxrnd DOT com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Corinna Vinschen via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Corinna Vinschen Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" On Feb 16 23:33, Lionel Cons via Cygwin wrote: > On Sun, 16 Feb 2025 at 22:47, Mark Geisert wrote: > > > > In the doc tree, change the title of section "Other UNIX system > > interfaces..." to "Other system interfaces...". Add the spawn family of > > functions noting their origin as Windows. > > re spawn() family: Cygwin posix_spawn() seems to rely on the rather > inefficient vfork(), while Opengroup intended it to be an API to > Windows spawn(). > > Is there a technical limitation why Cygwin posix_spawn() cannot use > WinAPI spawn() directly? The requirements of posix_spawn and their helper functions are so that we can't easily fulfill them without doing the fork/exec twist. See https://man7.org/linux/man-pages/man3/posix_spawn.3.html. Windows CreateProcess() is not quite the same as Linux clone(). However, if you think you can come up with a version only running the spawnve function and thus speed up Cygwin, feel free to send patches. Corinna -- 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