Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Windows lacks fork(), or at least it's not documented.

The NT kernel supports forking, but the Win32 subsystem does not. Because Interix lives outside the Win32 subsystem, it can provide a proper fork() implementation, whereas Cygwin has to live with its somewhat brittle emulation.



Maybe I misunderstand this, but couldn't someone write a driver for Cygwin to have a better fork implementation?


As I understand it, the problem lies with making the different subsystems interact: Forking itself is reasonably easy using NtCreateProcess(), but the Win32 subsystem won't know how to deal with the forked process and stuff will break, including console output.

I don't see Microsoft adding forking support to the Win32 subsystem any time soon, so you'd end up rewriting Cygwin from scratch by reverse engineering Interix...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: