Why does Cygwin not use MiCloneProcessAddressSpace() for fork()

Old, Oliver Oliver.Old@loewen.de
Mon Sep 22 11:28:23 GMT 2025


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.

Best regards
Oliver
________________________________
LÖWEN ENTERTAINMENT GmbH • Saarlandstraße 240 • 55411 Bingen am Rhein • Geschäftsführung: Christian Arras (Vorsitzender), Oliver Bagus, Dr. Daniel Henzgen • Vorsitz im Aufsichtsrat: Uwe Christiansen • Amtsgericht Mainz • HRB 23327 • USt.-IdNr. DE148266135 • WEEE-Reg.-Nr. DE 53361450 • Tel.: +49 6721 407 0 • E-Mail: info@loewen.de


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /