mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-07 11:48:30 +00:00
Get fork() working on Windows
This is done without using Microsoft's internal APIs. MAP_PRIVATE mappings are copied to the subprocess via a pipe, since Microsoft doesn't want us to have proper COW pages. MAP_SHARED mappings are remapped without needing to do any copying. Global variables need copying along with the stack and the whole heap of anonymous mem. This actually improves the reliability of the redbean http server although one shouldn't expect 10k+ connections on a home computer that isn't running software built to serve like Linux or FreeBSD.
This commit is contained in:
parent
aea89fe832
commit
db33973e0a
105 changed files with 1476 additions and 912 deletions
|
@ -34,8 +34,8 @@ int64_t LoadLibraryEx(const char16_t *lpLibFileName, int64_t hFile,
|
|||
uint32_t dwFlags);
|
||||
uint32_t GetModuleFileName(int64_t hModule, char16_t *lpFilename,
|
||||
uint32_t nSize);
|
||||
intptr_t GetModuleHandle(const char *lpModuleName);
|
||||
intptr_t GetModuleHandleW(const char16_t *lpModuleName);
|
||||
intptr_t GetModuleHandle(const char *opt_lpModuleName);
|
||||
intptr_t GetModuleHandleW(const char16_t *opt_lpModuleName);
|
||||
void *GetProcAddress(int64_t hModule, const char *lpProcName);
|
||||
int32_t FreeResource(int64_t hResData);
|
||||
intptr_t LockResource(int64_t hResData);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue