Brad Fitzpatrick (brad) wrote,
Brad Fitzpatrick

sendfile documentation sucks?

$ man 2 sendfile (Debian; manpages-dev 1.66-1)

Things to note:

-- it doesn't say offset can be NULL
-- it says "Sendfile does not modify the current file pointer of in_fd, but does for out_fd."

Well, turns out offset can be NULL (Linux 2.6.5, fs/read_write.c:638, sys_sendfile) and the in_fd is moved (*ppos = ... ; Linux 2.6.5, mm/filemap.c:725).

So on one hand I'm disappointed in crappy docs, but at least the source is available. *shrug?*

  • Ukraine

    Nobody reads my LiveJournal anymore, but thank you to everybody in Russia protesting Putin's insane war against Ukraine. (I know it's risky…

  • Happy Birthday!

    Happy 20th Birthday, LiveJournal! 🐐🎂🎉

  • hi

    Posting from the iPhone app. Maybe I'm unblocked now.

  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.