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.

curl -Z always exits 0

From: Jordan Geoghegan via curl-users <>
Date: Mon, 12 Apr 2021 18:38:56 -0700


I was hoping to get a sanity check here regarding semantics with the -Z/--parallel flag.

I'm using curl to download multiple files over HTTPS in a script, and I've found that no matter what, curl when invoked with -Z/--parallel always exits with a zero code. More specifically, it seems that the '--fail' and '--fail-early' flags have no effect when curl is invoked with -Z/--parallel:

$ curl --fail || echo FAILED
curl: (22) The requested URL returned error: 404

$ curl -Z --fail || echo FAILED
curl: (22) The requested URL returned error: 404

$ curl --fail -s
$ echo $?                                                     
$ curl -Z --fail -s
$ echo $?                                         

Is this is a bug, or am I just holding it wrong?

My tests were run on an OpenBSD 6.8 machine with the following 'curl -V' output:

curl 7.72.0 (x86_64-unknown-openbsd6.8) libcurl/7.72.0 LibreSSL/3.2.2 zlib/1.2.3 nghttp2/1.41.0
Release-Date: 2020-08-19
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS HTTP2 HTTPS-proxy IPv6 Largefile libz NTLM NTLM_WB SSL UnixSockets

Any insight or advice would be greatly appreciated.



Received on 2021-04-13