Subject: Re: postfix broken by AF_LOCAL semantics change
To: None <>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 11/29/2003 16:11:13
>> Everyone agrees that connect() can block, right?
> It doesn't work that way on virtually any Unix --

Whether it works that way or not is semi-irrelevant.  I'm with Jaromir
on this: if that's not how it's documented as working, code that
assumes it works that way is broken and needs fixing.  (Or, at the very
minimum, the documentation needs fixing.)

Is there a standard specifying how AF_LOCAL sockets work (POSIX maybe)?
Does it say anything about this?

> [...].  Code therefore gets written that depends on the behavior that
> got restored.

Broken code - unless of course the behaviour _is_ documented.

Writing code by depending on how it works today and assuming it will
work that way everywhere and forever is lazy coding and produces broken
code.  That is the mindset that gave us "all the world's a VAX" and,
later, "all the world's an x86".

> BTW, the dependency in Postfix was really subtle -- it took getting a
> full queue before you could detect it at all. I wouldn't be surprised
> if other programs breaking broke very very subtly.

Me neither.  Bugs often are subtle.  They're no less bugs, though.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B