On Mon, 22 Sept 2025 at 13:28, Old, Oliver via Cygwin <[email protected]> wrote:
>
> Mark Liam Brown wrote:
> > This is exposed to the userspace as NtCreateProcessEx() as documented in
> > https://github.com/huntandhackett/process-cloning
>
> From the linked page:
> > Unfortunately, it doesn't matter which method we prefer because the results
> > will be identically disappointing: STATUS_PROCESS_IS_TERMINATING, or, in 
> > other
> > words, "An attempt was made to access an exiting process." The system
> > considers the cloned threadless process as waiting for deletion and, thus,
> > refuses to create threads in it – something we inevitably need to execute
> > code. Sorry, but NtCreateProcessEx-based cloning is incompatible with code
> > execution.
> >
> > > Note that it wasn't always the case. The kernel allowed creating threads 
> > > in
> > > such processes until Windows 8.1.

That was a bug, long fixed. UWIN added pthread support at some point,
so yes, threads and RtlCloneUserProcess() do work together.

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

Reply via email to