Re: [PATCH] Parallel commands don't work when using lftp -c
"Alexander V. Lukyanov" <[email protected]> Wed, 8 Jun 2011 17:32:44 +0400
| Newsgroups | gmane.network.lftp.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Jun 01, 2011 at 06:57:20PM +0200, Fernando Gutierrez wrote: > **Problem: > Let's pretend rc has "set cmd:parallels 2;", so we are sure > max_waiting=3D2 (otherwise max_waiting may never be updated as I > explained in my previous mail). > When invoking lftp with "lftp -c 'get http://file1;get > http://file2;get http://file3;' , the files won't be downloaded in > parallel (2 at a time). Get is an example, my point is commands are > not executed in parallel when they are sent to lftp as arguments. > > After the initial filefeeder (made when rc is read) dies, > CmdExec::Do() returns too early. > > As it has no feeder, it returns in the following code, due to feeder=3D= =3Dnull: > if(m !=3D STALL || interactive || !feeder || waiting_num >=3D max_waiti= ng) > =A0 return m; Nice catch! I've applied the patch. -- Alexander.