Re: Weird loop in ftp client

2013-12-19 Thread Jérémie Courrèges-Anglas
Maxime Villard writes: > Is there something wrong with this patch? Nope, there is something wrong with ftp(1) and how it recovers from the error. I'll commit this tomorrow unless someone disagrees. > Le 29/11/2013 20:44, Maxime Villard a écrit : >> What about that? >> >> Index: ftp.c >> =

Re: Weird loop in ftp client

2013-12-14 Thread Maxime Villard
Is there something wrong with this patch? Le 29/11/2013 20:44, Maxime Villard a écrit : > What about that? > > Index: ftp.c > === > RCS file: /cvs/src/usr.bin/ftp/ftp.c,v > retrieving revision 1.83 > diff -u -r1.83 ftp.c > --- ftp.c

Re: Weird loop in ftp client

2013-11-29 Thread sven falempin
If the disk is full, having time to retry was nice ? Progress 90%. Nop try again... Anyway, Warning on error would be a first i guess to spot REAL problem. (Without changing the behavior). [Mail] + Broken Pipe, WEEK END. On Fri, Nov 29, 2013 at 2:44 PM, Maxime Villard wrote: > What about

Re: Weird loop in ftp client

2013-11-29 Thread Maxime Villard
What about that? Index: ftp.c === RCS file: /cvs/src/usr.bin/ftp/ftp.c,v retrieving revision 1.83 diff -u -r1.83 ftp.c --- ftp.c 13 Nov 2013 20:41:14 - 1.83 +++ ftp.c 29 Nov 2013 21:17:49 - @@ -1089,9 +1089,10

Re: Weird loop in ftp client

2013-11-26 Thread Maxime Villard
Le 23/11/2013 11:40, Otto Moerbeek a écrit : > On Fri, Nov 22, 2013 at 10:04:02PM +0100, Maxime Villard wrote: > >> Le 22/11/2013 17:48, Ted Unangst a ??crit : >>> On Fri, Nov 22, 2013 at 10:09, Stuart Henderson wrote: On 2013/11/22 07:25, Maxime Villard wrote: >>> > If write() fails with

Re: Weird loop in ftp client

2013-11-24 Thread Andres Perera
On Sun, Nov 24, 2013 at 7:29 PM, sven falempin wrote: > > > On Sun, Nov 24, 2013 at 5:57 PM, Andres Perera wrote: >> >> >> >> >> On Sun, Nov 24, 2013 at 12:11 PM, sven falempin >> wrote: >>> >>> On Sat, Nov 23, 2013 at 5:47 PM, Theo de Raadt >>> wrote: >>> >>> > > On 2013/11/23 14:39, sven falem

Re: Weird loop in ftp client

2013-11-24 Thread Andres Perera
On Sun, Nov 24, 2013 at 12:11 PM, sven falempin wrote: > On Sat, Nov 23, 2013 at 5:47 PM, Theo de Raadt >wrote: > > > > On 2013/11/23 14:39, sven falempin wrote: > > > > Hello, > > > > > > > > Another point of vue : > > > > Because curl is in base, what does ftp client add to the system ? > > > >

Re: Weird loop in ftp client

2013-11-24 Thread sven falempin
On Sat, Nov 23, 2013 at 5:47 PM, Theo de Raadt wrote: > > On 2013/11/23 14:39, sven falempin wrote: > > > Hello, > > > > > > Another point of vue : > > > Because curl is in base, what does ftp client add to the system ? > > > > ftp(1) is not without problems (bad ssl support, semi-broken proxy > >

Re: Weird loop in ftp client

2013-11-24 Thread sven falempin
On Sat, Nov 23, 2013 at 5:29 PM, Stuart Henderson wrote: > On 2013/11/23 14:39, sven falempin wrote: > > Hello, > > > > Another point of vue : > > Because curl is in base, what does ftp client add to the system ? > > ftp(1) is not without problems (bad ssl support, semi-broken proxy > support, di

Re: Weird loop in ftp client

2013-11-23 Thread Theo de Raadt
> On 2013/11/23 14:39, sven falempin wrote: > > Hello, > > > > Another point of vue : > > Because curl is in base, what does ftp client add to the system ? > > ftp(1) is not without problems (bad ssl support, semi-broken proxy > support, difficult code) but it has one major advantage: the small >

Re: Weird loop in ftp client

2013-11-23 Thread Stuart Henderson
On 2013/11/23 14:39, sven falempin wrote: > Hello, > > Another point of vue : > Because curl is in base, what does ftp client add to the system ? ftp(1) is not without problems (bad ssl support, semi-broken proxy support, difficult code) but it has one major advantage: the small version used on r

Re: Weird loop in ftp client

2013-11-23 Thread Alexander Hall
On 11/23/13 20:39, sven falempin wrote: Hello, Another point of vue : Because curl is in base, what does ftp client add to the system ? 1. It's not. 2. Interactivity. /Alexander

Re: Weird loop in ftp client

2013-11-23 Thread Alexey E. Suslikov
sven falempin gmail.com> writes: > > Hello, > > Another point of vue : > Because curl is in base, what does ftp client add to the system ? pkg_delete curl and you'll understand.

Re: Weird loop in ftp client

2013-11-23 Thread sven falempin
Hello, Another point of vue : Because curl is in base, what does ftp client add to the system ? Cheers :-) On Sat, Nov 23, 2013 at 5:40 AM, Otto Moerbeek wrote: > On Fri, Nov 22, 2013 at 10:04:02PM +0100, Maxime Villard wrote: > > > Le 22/11/2013 17:48, Ted Unangst a ??crit : > > > On Fri,

Re: Weird loop in ftp client

2013-11-23 Thread Otto Moerbeek
On Fri, Nov 22, 2013 at 10:04:02PM +0100, Maxime Villard wrote: > Le 22/11/2013 17:48, Ted Unangst a ??crit : > > On Fri, Nov 22, 2013 at 10:09, Stuart Henderson wrote: > >> On 2013/11/22 07:25, Maxime Villard wrote: > > > >>> If write() fails without EPIPE, d is decremented, and the function > >

Re: Weird loop in ftp client

2013-11-22 Thread Maxime Villard
Le 22/11/2013 17:48, Ted Unangst a écrit : > On Fri, Nov 22, 2013 at 10:09, Stuart Henderson wrote: >> On 2013/11/22 07:25, Maxime Villard wrote: > >>> If write() fails without EPIPE, d is decremented, and the function >>> keeps looping. If write() succeeds after several loops, d will be >>> negat

Re: Weird loop in ftp client

2013-11-22 Thread Maxime Villard
Le 22/11/2013 11:09, Stuart Henderson a écrit : > On 2013/11/22 07:25, Maxime Villard wrote: >> Hi, >> a thing I spotted some weeks ago >> >> - - - usr.bin/ftp/ftp.c l.1090 - - - >> >> d = 0; >> do { >> wr = write(fileno(fout), buf + d, rd); >> if (wr == -1 && er

Re: Weird loop in ftp client

2013-11-22 Thread Ted Unangst
On Fri, Nov 22, 2013 at 10:09, Stuart Henderson wrote: > On 2013/11/22 07:25, Maxime Villard wrote: >> If write() fails without EPIPE, d is decremented, and the function >> keeps looping. If write() succeeds after several loops, d will be >> negative, and the function will write from buf-XX. When

Re: Weird loop in ftp client

2013-11-22 Thread Damien Miller
On Fri, 22 Nov 2013, Stuart Henderson wrote: > do { > wr = write(fileno(fout), buf + d, rd); > - if (wr == -1 && errno == EPIPE) > - break; > - d += wr; >

Re: Weird loop in ftp client

2013-11-22 Thread Stuart Henderson
On 2013/11/22 07:25, Maxime Villard wrote: > Hi, > a thing I spotted some weeks ago > > - - - usr.bin/ftp/ftp.c l.1090 - - - > > d = 0; > do { > wr = write(fileno(fout), buf + d, rd); > if (wr == -1 && errno == EPIPE) > break; >

Weird loop in ftp client

2013-11-22 Thread Maxime Villard
Hi, a thing I spotted some weeks ago - - - usr.bin/ftp/ftp.c l.1090 - - - d = 0; do { wr = write(fileno(fout), buf + d, rd); if (wr == -1 && errno == EPIPE) break; d += wr; rd -= wr; }