Re: sockaddr_un.sun_len vs. reality
| От | Thomas Munro |
|---|---|
| Тема | Re: sockaddr_un.sun_len vs. reality |
| Дата | |
| Msg-id | CA+hUKGKjxvxwC6W+PBH=FTsmOiej27neH+JbYVV6zYeoJMWUvA@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: sockaddr_un.sun_len vs. reality (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-hackers |
On Tue, Aug 23, 2022 at 3:43 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > Thomas Munro <thomas.munro@gmail.com> writes: > > I was nerd-sniped by the historical context of this single line of > > code. I'd already wondered many times (not just in PostgreSQL) > > whether and when that became a cargo-cult practice, replicated from > > other software and older books like Stevens. I failed to find any > > sign of an OS that needs it today, or likely even needed it this > > millennium. Now I'd like to propose removing it. > > Seems worth a try. Pushed, and build farm looks good. For the benefit of anyone else researching this topic, I should add that Stevens in fact said it's OK to skip this, and if I had opened UNIX Network Programming (3rd ed) volume I to page 99 I could have saved myself some time: "Even if the length field is present, we need never set it and need never examine it, unless we are dealing with routing sockets ...".
В списке pgsql-hackers по дате отправления: