mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-05 18:58:30 +00:00
Overhaul process spawning
This commit is contained in:
parent
99dc1281f5
commit
26e254fb4d
96 changed files with 1848 additions and 1541 deletions
|
@ -128,6 +128,7 @@ textwindows static char16_t *CreateStdinPipeName(char16_t *a, int64_t h) {
|
|||
// this makes it possible for our read() implementation to periodically
|
||||
// poll for signals while performing a blocking overlapped io operation
|
||||
textwindows void WinMainStdin(void) {
|
||||
uint32_t conmode;
|
||||
char16_t pipename[64];
|
||||
int64_t hStdin, hWriter, hReader, hThread, hSemaphore;
|
||||
if (!SupportsWindows()) return;
|
||||
|
@ -137,6 +138,10 @@ textwindows void WinMainStdin(void) {
|
|||
Log("<stdin> GetStdHandle failed\n");
|
||||
return;
|
||||
}
|
||||
if (!__imp_GetConsoleMode(hStdin, &conmode)) {
|
||||
Log("<stdin> stdin not a console\n");
|
||||
return;
|
||||
}
|
||||
CreateStdinPipeName(pipename, hStdin);
|
||||
hReader = __imp_CreateFileW(pipename, kNtGenericRead, 0, 0, kNtOpenExisting,
|
||||
kNtFileFlagOverlapped, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue