DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 58N9pb8B2069415
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 58N9pb8B2069415
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=kleYeDa+
X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 88CDB385840F
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1758621095;
	bh=UZIrecadNRio7zgYtQi8hcy7Pw88bgya73YpyF7IZcY=;
	h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe:
	 List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
	 From;
	b=kleYeDa+PhLb7bH8NYRLTarOvuHW53k/YEIBU64ulj8GDCwCawSA86A6ST3wH04Ab
	 JngTbhdGdN9iTY1DZZcIRXjCHnJZz8GoXFmXgWMFqtgOHE64O/3Vcj0Ub3xFtLZ2Nr
	 xeOBUygIil+5bDZyOvHtnNpyBYU3+oTpWMfF2kQ4=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4AAD03858D26
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4AAD03858D26
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1758621027; cv=none;
 b=br+r8fZtCb86fs0M7pUTu0vBHkbMVf8jJrIhthQQ5qQ0PPQZqFhCt1ovjpfQOPxKaKzOAxBN6S1pn30rMLaVyFpypF5q//XrU3D0xd6xYbNLp4WJJlJxhMag5d9pAflDMNqkxTVWsHq9fqkHfzm4cXz9skVVGXXKvbBPsx2hjek=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
 t=1758621027; c=relaxed/simple;
 bh=T84Z11SylqJ9BGAVcjx/sVXAuLqxCtB/Vr+/+ii2M24=;
 h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To;
 b=eUd/8qya2GJppiNuSlxPqmzlh2pnSfUVxWGANZsCKzDDWdkXMwRlC7S9DjqGbyE6anCoXFEOXJm3T58u7sqy+oPMmT36ES278Vh2vV5RTuVlFNcsJPeNSpfqarE96AYyCCT1rcB0HXz1I8Qv9znWZfPG9gIYX8O3VCOxiEm6bwE=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4AAD03858D26
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1758621025; x=1759225825;
 h=to:subject:message-id:date:from:in-reply-to:references:mime-version
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=NzyKslDtKFI2hYYTix8J6aWGQoAZzeiprd3NLq0xphU=;
 b=agkOd9wiOkJ3CXBrexseMw2HF+QYrK92xVq95WREzab0HOLGHpm+MGLJhqnmieXFUB
 MnpljOsMBipArfOH1Ev2tbqIrqIbSnWMJAtsmBSJXSXnj2sLssRd+TE3IV5QuKq2zW4X
 w+LApBNn98/1ss4IH+MDXJYkvWl1coGF8GC2epU9PwS32aYpEhmSMc/HsPDLCKRuDdev
 CtvcNockl5jXQg5O3RRttzjTyRvQBa2PlPN9Ktybpgm104NmDkNSwbLl9EUdu42uloyp
 lor7rYXSl2u/DPPPAGU28KFZhV37RMxrzKCrOx8fyDy+fLyDh+OvwSfvgcRZOsagfJMs
 +wKQ==
X-Gm-Message-State: AOJu0YxTlFfi8uhuG7gL9NkLi2CC3DZwcVNdyJNzQC6smAxAik9zSlQB
 BkuiTn5l/SyIeBsIcbpLhq8b+klpSv7jTDdmegUWjwuGvODis9o4x/ZMPqkRItnk7rIjK1jg9Kc
 bP7J9OtZRRxoGtgZgITAFWlVXGoUR3/YkqIgM
X-Gm-Gg: ASbGncvQ8y664+kygUKKYpjy2EMRVI2IhD45YKXuVG53gNZvdq5jXnaTPsUmXUlbeCC
 qEPm9Drwr2DCSujmqcnS6qt6NgATEqSf+HIb+V3Z2fQlDOWy8+5/l8Y3A92RAL/KMpD01FSHldX
 AAfstB8zKceuRxcLISJ9dp+qh1L1A+o4kCX7ecLVzDTM8d5G/O4LTlOQmEaJlKPSw0J9u87rvQ1
 4f2E60=
X-Google-Smtp-Source: AGHT+IGZAJY2jrkbTw6oWTlj8m0SORqtclqrvkVUdhJyaaPo71+gmwo+lvQJOTmSzRZDl2wp9cRoN/vPZsihGnQT0pM=
X-Received: by 2002:a17:907:60d3:b0:b1d:368e:3ae5 with SMTP id
 a640c23a62f3a-b3020f1e2a5mr177621566b.0.1758621024741; Tue, 23 Sep 2025
 02:50:24 -0700 (PDT)
MIME-Version: 1.0
References: <CAN0SSYzFKJoZRU7fCm4YKH5O_J3SMvCjjgfua7zUJQL4Zj3rzA@mail.gmail.com>
 <631f0af5-d05c-cb33-956f-b1c284a37766@jdrake.com>
In-Reply-To: <631f0af5-d05c-cb33-956f-b1c284a37766@jdrake.com>
Date: Tue, 23 Sep 2025 11:49:48 +0200
X-Gm-Features: AS18NWBXrjN7wq3c6KWqnK28rsKYcKS6w5UiS_rMzG5anaw_IlBqQpK6m7J9mho
Message-ID: <CAPJSo4WL5sh-jhAgVq9yZMYVvKT-iq04Ncx5E4yrfd6uQ1+deg@mail.gmail.com>
Subject: Re: Why does Cygwin not use MiCloneProcessAddressSpace() for fork()
To: cygwin@cygwin.com
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.30
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: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Lionel Cons via Cygwin <cygwin@cygwin.com>
Reply-To: Lionel Cons <lionelcons1972@gmail.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie.com@cygwin.com>

On Mon, 22 Sept 2025 at 23:28, Jeremy Drake via Cygwin
<cygwin@cygwin.com> wrote:
>
> On Mon, 22 Sep 2025, Mark Liam Brown via Cygwin wrote:
>
> > Greetings!
> >
> > Why does Cygwin not use MiCloneProcessAddressSpace() for fork()? That
> > function was added for the Windows Services for UNIX, and it still
> > working in Windows 11.
> >
> > Mark
> >
>
> This is a perennial question, and the short answer is that it doesn't play
> well with win32 dlls.  Replies turned up via simple search:
>
> https://cygwin.com/pipermail/cygwin/2016-January/225571.html
> https://cygwin.com/pipermail/cygwin/2018-January/235767.html

Maybe those bugs were fixed in the meantime? UWIN has threads, uses
DLLs (UWIN build DLLs, stock Windows DLLs, 3rd party DLLs, ...) and
obviously has full console support (even tmux works).

I also would be VERY happy to escalate any bugs related to
RtlCloneUserProcess() in Cygwin. Very few things (except proof for
extensions to THE Standard Model) would make me more happy than a
faster (RtlCloneUserProcess() based) fork() in Cygwin.

Lionel

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