James Carlson wrote:
> Garrett D'Amore writes:
>
>> Then those interfaces should not have been promoted, IMO. Instead,
>> leave a contract in place, and provide suitable replacements for truly
>> public consumption that either lack the side effect, or make it clear
>> that a side effect exists (mcopyandfreemsg().). As I pointed out
>> earlier, there are cases where that side effect is toxic, and mcopymsg()
>> cannot be used.
>>
>
> I agree that the current man page documentation is incomplete and
> should be fixed ... but I do not understand why the function name
> itself needs to document all possible side-effects. That seems like
> an unnecessarily high bar to cross.
>
I believe that major side effects like this should be relatively obvious
from looking at header files. Some side effects are probably minor
enough to ignore. But this one certainly caught me totally unprepared,
and it took me an extra day or so of debugging to figure out the
problem. I subscribe to the principle of least surprise, and this side
effect in mcopymsg() was IMO a big offender of that principle.
-- Garrett
_______________________________________________
networking-discuss mailing list
[email protected]