errexit() was supposed to be used in order to avoid
linking-in stdio, but err(3) is used in other parts of
the code already, so there's no reason to keep errexit().
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
Did you try "git blame bin/echo/echo.c" ?
Look at this:
commit 91b7d6dc5871f532b1a86ee76389a9bc348bdf58
Author: Diomidis Spinellis <dds@FreeBSD.org>
Date: Sat Oct 11 20:34:43 2003 +0000
- Check and report write(2) errors.
- Issue a single writev(2) call instead of multiple write(2)s.
This change improves the inefficiencies introduced when echo
went on an stdio diet.
The following figures are for echoing 1000 arguments.
original stdio-based echo:
0.01 real 0.01 user 0.00 sys
before:
0.05 real 0.00 user 0.04 sys
after:
0.01 real 0.00 user 0.00 sys
Notes:
svn path=/head/; revision=121010Comment Actions
So errexit() was introduced when they wanted to avoid using
stdio. Now err(3) was already being used, so is this really a revert?
Also this cannot be a performance issue -- both errexit() and err(3)
would only get called once after all.