svn commit: r309109 - head/lib/libutil

Dag-Erling Smørgrav des at des.no
Thu Nov 24 19:39:37 UTC 2016


John Baldwin <jhb at freebsd.org> writes:
> Of course, there's only one person who has touched flopen [...]
> Perhaps you were just warning yourself? :)

Precisely.  If memory serves, I wrote that comment after receiving a
patch from someone who made the same mistake that I had already made and
reverted *twice*.  It's the logical, sane thing to do: replace a BSD
primitive with the equivalent POSIX primitive, except the latter has
subtly different semantics and works in some of flopen(3)'s typical use
cases, but not all, and crucially, not in the pidfile(3) case.

I just remembered that I wrote a unit test for flopen(3).  So maybe the
comment is redundant...  if you assume that people build and run the
tests, and I'm willing to bet that they don't, because our test
framework is not very developer-friendly.

DES
-- 
Dag-Erling Smørgrav - des at des.no


More information about the svn-src-head mailing list