Bug #1813

bad errno check in network_freebsd_sendfile.c

Added by peto over 7 years ago. Updated about 7 years ago.

Target version:
Start date:
Due date:
% Done:


Missing in 1.5.x:


sendfile() doesn't document errno on success, so don't examine it when an error wasn't returned.

The only way the sendfile() condition can continue after an error without returning is these two errors anyway, so just check this on success.

lighttpd-bad-errno-check.diff Magnifier (544 Bytes) peto, 2008-10-31 21:23

Associated revisions

Revision 2389
Added by stbuehler about 7 years ago

Fix error handling in freebsd-sendfile (fixes #1813)


#1 Updated by stbuehler over 7 years ago

  • Status changed from New to Patch Pending
  • Patch available changed from Yes to No

Just as a note so you don't feel like we just would ignore you: my laptop doesn't work atm, and i hope to get my new one soon - then i think i can fix some of the bugs you found :)

The Patch available box was only for the migration from trac, we want to use the status "Patch Pending" for that in the future.

Thx for your help!

#2 Updated by stbuehler about 7 years ago

I couldn't find the mentioned code in the trunk, perhaps you meant 1.4?

#3 Updated by peto about 7 years ago

Yeah. Sorry, was debugging both versions, as we have 1.4 running for fcgi and 1.5 for the file heavy-lifting.

Looking at the equivalent code in 1.5, EINTR probably needs to be handled there, too (only EAGAIN is checked).

#4 Updated by stbuehler about 7 years ago

  • Status changed from Patch Pending to Fixed
  • % Done changed from 0 to 100

Applied in changeset r2389.

Also available in: Atom