Re: int sendfile(int out_fd,int in_fd,off_t* offset,size_t count)

Florian Weimer (fw@s.netic.de)
14 Aug 1999 14:29:53 +0200


Arjan van de Ven <root@fenrus.demon.nl> writes:

> >> for example,what if out_fd is a non block I/O?
>
> > sendfile sends as many data as possible without blocking. After that,
> > it returns `EWOULDBLOCK'.
>
> Are you very sure? Last time I checked, it didn't. (Granted, this was by
> looking at the code).

I've only looked at the code, too. :-/ I won't say that you are wrong
(despite your k3wl `root' local-part ;), but you might want to have
a look at file_send_actor(). The call on file->f_op->write() can return
-EWOULDBLOCK, and an error is passed to the calling function.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/