sendfile() with zero size

2023-06-18 Thread Fotis Panagiotopoulos
Hello, Due to a bug in my application, the code tried to use sendfile() with zero size. As I see, sendfile() will happily proceed, and it will block here: https://github.com/apache/nuttx/blob/master/net/tcp/tcp_sendfile.c#L523 Obviously, it will never manage to send any data (as the requested

Re: sendfile() with zero size

2023-06-18 Thread Alan C. Assis
Hi Fotis, On 6/18/23, Fotis Panagiotopoulos wrote: > Hello, > > Due to a bug in my application, the code tried to use sendfile() with zero > size. > > As I see, sendfile() will happily proceed, and it will block here: > https://github.com/apache/nuttx/blob/master/net/tc

Re: sendfile() with zero size

2023-06-18 Thread Alan C. Assis
plication, the code tried to use sendfile() with >> zero >> size. >> >> As I see, sendfile() will happily proceed, and it will block here: >> https://github.com/apache/nuttx/blob/master/net/tcp/tcp_sendfile.c#L523 >> >> Obviously, it will never manage to send any

Re: sendfile() with zero size

2023-06-18 Thread Fotis Panagiotopoulos
> On 6/18/23, Alan C. Assis wrote: > > Hi Fotis, > > > > On 6/18/23, Fotis Panagiotopoulos wrote: > >> Hello, > >> > >> Due to a bug in my application, the code tried to use sendfile() with > >> zero > >> size. > >> >

Re: sendfile() with zero size

2023-06-18 Thread Petro Karashchenko
ux. > > > > I'm expecting at least a similar error on Linux. > > > > BR, > > > > Alan > > > > On 6/18/23, Alan C. Assis wrote: > > > Hi Fotis, > > > > > > On 6/18/23, Fotis Panagiotopoulos wrote: > > >> Hello,

Re: sendfile() with zero size

2023-06-19 Thread Fotis Panagiotopoulos
> I'm expecting at least a similar error on Linux. > > > > > > BR, > > > > > > Alan > > > > > > On 6/18/23, Alan C. Assis wrote: > > > > Hi Fotis, > > > > > > > > On 6/18/23, Fotis Panagiotopoulos wrot