diff options
author | NARUSE, Yui <[email protected]> | 2022-12-15 00:14:00 +0900 |
---|---|---|
committer | NARUSE, Yui <[email protected]> | 2022-12-15 00:14:00 +0900 |
commit | 9eb19a02aea2f867972d2c28cab25e5df162091f (patch) | |
tree | cabdbd973f70ef425f2ef4832b72ea8c49040648 /win32/win32.c | |
parent | 1df6d0e57828de9606613db940e32aa5b15eff18 (diff) |
Add more comments why CRuby uses __pioinfo
Diffstat (limited to 'win32/win32.c')
-rw-r--r-- | win32/win32.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/win32/win32.c b/win32/win32.c index 1a532c6c7c..36335f144f 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -2584,6 +2584,18 @@ set_pioinfo_extra(void) # define UCRTBASE "ucrtbase.dll" # endif /* get __pioinfo addr with _isatty */ + /* + * Why Ruby depends to _pioinfo is + * * to associate socket and fd: CRuby creates fd with dummy file handle + * and set socket to emulate Unix-like behavior. Without __pioinfo + * we need something which manages the fd number allocation + * * to implement overlapped I/O for Windows 2000/XP + * * to emulate fcntl(2) + * + * see also + * * https://bugs.ruby-lang.org/issues/11118 + * * https://bugs.ruby-lang.org/issues/18605 + */ char *p = (char*)get_proc_address(UCRTBASE, "_isatty", NULL); char *pend = p; /* _osfile(fh) & FDEV */ |