mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-08 20:28:30 +00:00
Make stdin pollable on Windows
You can now play Super Mario Bros in CMD.EXE using Cosmopolitan! This is thanks to a new worker thread that's spawned on Windows whenever any one of poll(), select(), or ioctl(FIONREAD) is linked.
This commit is contained in:
parent
ef6387ee5e
commit
9c0821def7
15 changed files with 280 additions and 58 deletions
|
@ -34,7 +34,7 @@ textwindows int sys_pipe_nt(int pipefd[2], unsigned flags) {
|
|||
int64_t hin, hout;
|
||||
int reader, writer;
|
||||
char16_t pipename[64];
|
||||
CreatePipeName(pipename);
|
||||
__create_pipe_name(pipename);
|
||||
__fds_lock();
|
||||
if ((reader = __reservefd_unlocked(-1)) == -1) {
|
||||
__fds_unlock();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue