www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/02/17/13:35:54

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 51HIZs4G3066749
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 51HIZs4G3066749
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=PnD76pQk
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E2FB03858C66
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1739817353;
bh=gzp+q7Tgz1JD73gq/cOcSyx/iTbFka1KVWZJPGNCUHo=;
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=PnD76pQkpbDa+gDk2VX7jWsYKqOn077zWb+PpeqZUwibDC+hIoEXjg3RSYdkmXfbY
8ATe0RgtSiSJEtEtNrkR8LghQlWPgm5HuC8c/lYmmBO/EEG9mgb8efsBgXRkfHdXE+
WMghlOhwgHX12Atn542h86hBaTQmO8c7mFkI33S8=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2944D3858D21
Date: Mon, 17 Feb 2025 19:34:38 +0100
To: cygwin 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: <Z7OBPqvotJt9fk6B@calimero.vinschen.de>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20250216214657 DOT 2303-1-mark AT maxrnd DOT com>
<CAPJSo4VH0MufLhpgPiD1GV1gFsbTLdtOKrP82eaA_Yv_DHPXEQ AT mail DOT gmail DOT com>
<Z7MKkIbgMh0C5snl AT calimero DOT vinschen DOT de>
<CAPJSo4WedM5V8uJD=j-XG6Rxueof2Wph6vUncqwa7XrX_iSkow AT mail DOT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <CAPJSo4WedM5V8uJD=j-XG6Rxueof2Wph6vUncqwa7XrX_iSkow@mail.gmail.com>
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-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
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: Corinna Vinschen via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>

On Feb 17 19:06, Lionel Cons via Cygwin wrote:
> On Mon, 17 Feb 2025 at 11:08, Corinna Vinschen via Cygwin
> <cygwin AT cygwin DOT com> wrote:
> >
> > On Feb 16 23:33, Lionel Cons via Cygwin wrote:
> > > On Sun, 16 Feb 2025 at 22:47, Mark Geisert <mark AT maxrnd DOT com> 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.
> 
> How did UWIN do that? I did ask around - Glenn Fowler of AT&T Research
> demonstrated a prototype of UWIN posix_spawn() before posix_spawn()
> was finalised by the Austin Group as Opengroup POSIX standard. So this
> IS possible, and because non fork() or page cloning has to be done it
> should be significantly faster than the
> fork()-and-throw-copied-data-away-at-exec() approach.
> 
> > See https://man7.org/linux/man-pages/man3/posix_spawn.3.html.> Windows CreateProcess() is not quite the same as Linux clone().
> 
> Here might be the misunderstanding:
> posix_spawn() is intended NOT to copy anything except the file
> descriptors and requested attributes, no memory pages and no
> whatsoever. Everything should be done on the caller's process side,
> nothing in the child process.

Patches welcome.


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

- Raw text -


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