curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: feature request: support specifying Unix socket with systemd directive OpenFile=

From: Timothe Litt <litt_at_acm.org>
Date: Tue, 20 Jun 2023 15:59:00 -0400

/dev/fd/123


Timothe Litt
ACM Distinguished Engineer
--------------------------
This communication may not represent the ACM or my employer's views,
if any, on the matters discussed.

On 20-Jun-23 15:44, Rich Gray via curl-users wrote:
> Erik Sjölund via curl-users wrote:
> > ...
>
> Instead of adding a -fd variant to each command, maybe a more generic
> approach would be to have a syntax that indicates a filename is really
> an fd.  Something like an ampersand followed by the digits of fd
> number.  (An ampersand ('&') would require suitable command line
> escaping/quoting.)  This could be used with any command that
> recognizes the alternative syntax.  A favorite of mine would be -K,
> --config with an fd to hide command line options when a program is
> driving curl.
>
> -K '&3'
> --config \&${config_fd}
>
>>
>> Regarding the user interface, a new command-line argument could be added
>>
>> For example:
>> --unix-socket-fdname myfdname
>
> --unix-socket \&${sock_fd}
>
>>
>> A side note: OpenFile= could also be used for opening normal files.
>> In addition to the already existing command-line argument
>> --proxy-cacert
>> a new command-line argument
>> --proxy-cacert-fdname myfdname
>> could be added.
>
> --proxy-cacert '&4'
>
>
> Rich

-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2023-06-20