cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl waits for stdin to "EOF" before firing requests when "-K -" is used to read config from stdin

From: Rich Gray <rgray_at_plustechnologies.com>
Date: Wed, 16 Dec 2015 10:36:46 -0500

Daniel Stenberg wrote:
> On Wed, 16 Dec 2015, Dan Fandrich wrote:
>
>> The --next option opens up the possibility of adding a feature to do this.
>> Essentially, curl would parse options up to the --next, fire off the
>> transfer,
>
> Right. Or add a --next alternative that has that explicit functionality from
> the start to make it less likely to rock any boats. Something like: --run

Or <Schwarzenegger> --doitnow </Schwarzenegger>

https://www.youtube.com/watch?v=NflTOYuVJ0E ;)

> It would pause the config file reading, do the transfer with what's been
> given so far and then come back and continue reading.
>
>
> Then you could even have -K read from a named pipe and pipe options into
> that from whereever and get curl to wait and transfer stuff as soon as it
> parses the next --run from the pipe and just never quit! =)

If there were a mode where the pipe or whatever was bidirectional, curl
could return an exit code when the operation completes. Perhaps a syntax
for specifying file descriptors could be something like &n or -n.

-k -3 accept parms on fd3
-k -3,4 accept parms on fd3 with status code returned on fd 4

If this overloads -K --config too much, perhaps a variant could be defined.

This is sort of the reverse of my proposal "Scripting curl from the inside
out". http://curl.haxx.se/mail/archive-2014-06/0022.html

It was suggested in that thread that curl itself could be the caller after
launching a persistent agent. In that flavor, the calling curl would parse
parameters and send commands to a backgrounded version of itself.

-- 
Richard B. Gray, Senior Software Egr.| Direct:    +1 937-435-4045
Plus Technologies LLC                | Office:    +1 937-847-0614 x 2405
1860 Lyons Rd,                       | Fax:       +1 937-384-0842
Dayton, OH 45458  USA                | Toll Free:    877-899-7587 x 2405
www.plustechnologies.com             | Skype:     rgray.plustechnologies
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2015-12-16