Project

General

Profile

« Previous | Next » 

Revision a889304f

Added by NARUSE, Yui over 1 year ago

merge revision(s) 6c0e58a54e3fda604386d9c409e2a9998bbc9352: [Backport #20198] (#10252)

Make sure the correct error is raised for EAI_SYSTEM resolver fail

 In case of EAI_SYSTEM, getaddrinfo is supposed to set more detail in errno; however, because we call getaddrinfo on a thread now, and errno is threadlocal, that information is being lost. Instead, we just raise whatever errno happens to be on the calling thread (which can be something very confusing, like `ECHILD`). Fix it by explicitly propagating errno back to the calling thread through the getaddrinfo_arg structure. [Bug #20198] --- ext/socket/raddrinfo.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-)