Make more fixes and improvements

- Remove PAGESIZE constant
- Fix realloc() documentation
- Fix ttyname_r() error reporting
- Make forking more reliable on Windows
- Make execvp() a few microseconds faster
- Make system() a few microseconds faster
- Tighten up the socket-related magic numbers
- Loosen restrictions on mmap() offset alignment
- Improve GetProgramExecutableName() with getenv("_")
- Use mkstemp() as basis for mktemp(), tmpfile(), tmpfd()
- Fix flakes in pthread_cancel_test, unix_test, fork_test
- Fix recently introduced futex stack overflow regression
- Let sockets be passed as stdio to subprocesses on Windows
- Improve security of bind() on Windows w/ SO_EXCLUSIVEADDRUSE
This commit is contained in:
Justine Tunney 2023-07-29 18:44:15 -07:00
parent 140a8a52e5
commit 18bb5888e1
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
311 changed files with 1239 additions and 2622 deletions

View file

@ -904,7 +904,6 @@ if __name__ == 'PYOBJ.COM':
SO_PEERCRED = 0
SO_PEERSEC = 0
SO_PRIORITY = 0
SO_PROTOCOL = 0
SO_RCVBUF = 0
SO_RCVLOWAT = 0
SO_RCVTIMEO = 0

View file

@ -6760,7 +6760,6 @@ PyInit__socket(void)
PyModule_AddIntMacro(m, SO_DEBUG);
PyModule_AddIntMacro(m, SO_ACCEPTCONN);
if (SO_REUSEADDR) PyModule_AddIntMacro(m, SO_REUSEADDR);
if (SO_EXCLUSIVEADDRUSE) PyModule_AddIntMacro(m, SO_EXCLUSIVEADDRUSE);
PyModule_AddIntMacro(m, SO_KEEPALIVE);
PyModule_AddIntMacro(m, SO_DONTROUTE);
PyModule_AddIntMacro(m, SO_BROADCAST);
@ -6776,17 +6775,6 @@ PyInit__socket(void)
PyModule_AddIntMacro(m, SO_RCVTIMEO);
PyModule_AddIntMacro(m, SO_ERROR);
PyModule_AddIntMacro(m, SO_TYPE);
if (SO_SETFIB) PyModule_AddIntMacro(m, SO_SETFIB);
if (SO_PASSCRED) PyModule_AddIntMacro(m, SO_PASSCRED);
if (SO_PEERCRED) PyModule_AddIntMacro(m, SO_PEERCRED);
if (LOCAL_PEERCRED) PyModule_AddIntMacro(m, LOCAL_PEERCRED);
if (SO_PASSSEC) PyModule_AddIntMacro(m, SO_PASSSEC);
if (SO_PEERSEC) PyModule_AddIntMacro(m, SO_PEERSEC);
if (SO_BINDTODEVICE) PyModule_AddIntMacro(m, SO_BINDTODEVICE);
if (SO_PRIORITY) PyModule_AddIntMacro(m, SO_PRIORITY);
if (SO_MARK) PyModule_AddIntMacro(m, SO_MARK);
if (SO_DOMAIN) PyModule_AddIntMacro(m, SO_DOMAIN);
if (SO_PROTOCOL) PyModule_AddIntMacro(m, SO_PROTOCOL);
/* Maximum number of connections for "listen" */
PyModule_AddIntConstant(m, "SOMAXCONN", 0x80);
@ -6915,12 +6903,10 @@ PyInit__socket(void)
#endif
PyModule_AddIntMacro(m, IPPROTO_IP);
PyModule_AddIntMacro(m, IPPROTO_HOPOPTS);
PyModule_AddIntMacro(m, IPPROTO_ICMP);
PyModule_AddIntMacro(m, IPPROTO_TCP);
PyModule_AddIntMacro(m, IPPROTO_UDP);
PyModule_AddIntMacro(m, IPPROTO_RAW);
PyModule_AddIntMacro(m, IPPROTO_IGMP);
#ifdef IPPROTO_GGP
if (IPPROTO_GGP) PyModule_AddIntMacro(m, IPPROTO_GGP);
#endif