Re: [systemd-devel] Some thoughts about loop_read/loop_write in util.c

2013-09-30 Thread Lennart Poettering
On Fri, 13.09.13 08:38, cee1 (fykc...@gmail.com) wrote: > 2013/9/12 Lennart Poettering : > > On Thu, 12.09.13 09:43, cee1 (fykc...@gmail.com) wrote: > > > >> What about the following patch? It simply do read/write again if poll > >> returns, and let read/write report error if something is wrong. >

Re: [systemd-devel] Some thoughts about loop_read/loop_write in util.c

2013-09-12 Thread cee1
2013/9/12 Lennart Poettering : > On Thu, 12.09.13 09:43, cee1 (fykc...@gmail.com) wrote: > >> What about the following patch? It simply do read/write again if poll >> returns, and let read/write report error if something is wrong. > > I guess that patch makes sense, but could you change it to not j

Re: [systemd-devel] Some thoughts about loop_read/loop_write in util.c

2013-09-12 Thread Lennart Poettering
On Thu, 12.09.13 09:43, cee1 (fykc...@gmail.com) wrote: > What about the following patch? It simply do read/write again if poll > returns, and let read/write report error if something is wrong. I guess that patch makes sense, but could you change it to not just comment but delete the old lines? A

Re: [systemd-devel] Some thoughts about loop_read/loop_write in util.c

2013-09-11 Thread cee1
2013/9/11 Lennart Poettering : >> loop_read/loop_write: >> http://cgit.freedesktop.org/systemd/systemd/tree/src/shared/util.c#n2179 >> >> In a scenario of pipes, loop_read on read side, if the write side is >> closed, loop_read will return 0 if do_poll is false(let's assume no >> data available to

Re: [systemd-devel] Some thoughts about loop_read/loop_write in util.c

2013-09-11 Thread Lennart Poettering
On Wed, 11.09.13 21:50, cee1 (fykc...@gmail.com) wrote: > Hi all, > > loop_read/loop_write: > http://cgit.freedesktop.org/systemd/systemd/tree/src/shared/util.c#n2179 > > In a scenario of pipes, loop_read on read side, if the write side is > closed, loop_read will return 0 if do_poll is false(le