Add more comments why CRuby uses __pioinfo
This commit is contained in:
parent
1df6d0e578
commit
9eb19a02ae
@ -2584,6 +2584,18 @@ set_pioinfo_extra(void)
|
|||||||
# define UCRTBASE "ucrtbase.dll"
|
# define UCRTBASE "ucrtbase.dll"
|
||||||
# endif
|
# endif
|
||||||
/* get __pioinfo addr with _isatty */
|
/* 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 *p = (char*)get_proc_address(UCRTBASE, "_isatty", NULL);
|
||||||
char *pend = p;
|
char *pend = p;
|
||||||
/* _osfile(fh) & FDEV */
|
/* _osfile(fh) & FDEV */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user