News for hackers. Stuff that matters.
Re:Getaddrinfo() on glibc calls getenv(), oh boy by LoganDark on Monday October 16, 2023 @11:54PM (#37910392)
It opens a socket to the same process that called getaddrinfo. That is, it's just communicating with itself, using a brand-new randomly-generated port for each call. This should be completely unnecessary.
Re:Getaddrinfo() on glibc calls getenv(), oh boy by JackSlateur on Tuesday October 17, 2023 @08:18AM (#37913824)
So, I have a program that does getaddrinfo(3) and nothing more, and this program setup a socket, listen(2) to it, create another socket and connect with it to the first one ?

This looks insane and not what strace(1) tells me

Could you give me more details ?

Re:Getaddrinfo() on glibc calls getenv(), oh boy by LoganDark on Tuesday October 17, 2023 @05:13PM (#37921657)
I didn't know glibc didn't do the same thing. `getaddrinfo()` on Windows seems to do this because randomly a program will try to connect to `::1:59962` or something, and if I don't allow it in my firewall, it will start whining that some getaddrinfo thread failed to start. This has happened across all sorts of different programs. It's infuriating.