tool_operate: set stdin non-blocking unconditionally
No binary (build failed)
—
(log yok)
| @@ -439,6 +439,13 @@ then subsequently fails anyway if that was actually in use. | |
| [curl issue 8112](https://github.com/curl/curl/issues/8112) | |
| + | ## Stdin is not non-blocking on Windows |
| + | |
| + | The telnet handler reads data from stdin by default without needing to |
| + | specify that on the command line, but since Windows is special, reading |
| + | from stdin is not done in a non-blocking manner, meaning that curl might |
| + | block waiting for input without triggering the timeout. |
| + | |
| # HTTP/2 | |
| ## HTTP/2 prior knowledge over proxy | |
| @@ -1221,11 +1221,6 @@ static void check_stdin_upload(struct OperationConfig *config, | |
| else | |
| per->infd = (int)f; | |
| #endif | |
| - | if(curlx_nonblock((curl_socket_t)per->infd, TRUE) < 0) { |
| - | char errbuf[STRERROR_LEN]; |
| - | warnf("fcntl failed on fd=%d: %s", per->infd, |
| - | curlx_strerror(errno, errbuf, sizeof(errbuf))); |
| - | } |
| } | |
| } | |
| @@ -2360,6 +2355,8 @@ static CURLcode run_all_transfers(CURLSH *share, | |
| bool orig_noprogress = (bool)global->noprogress; | |
| bool orig_isatty = (bool)global->isatty; | |
| struct per_transfer *per; | |
| + | (void)curlx_nonblock((curl_socket_t)STDIN_FILENO, TRUE); |
| + | /* fail silently */ |
| /* Time to actually do the transfers */ | |
| if(!result) { | |
| @@ -23,10 +23,6 @@ telnet | |
| <name> | |
| TELNET read stdin without upload file | |
| </name> | |
| - | <stdin> |
| - | GET /we/want/%TESTNUMBER HTTP/1.0 |
| - | |
| - | </stdin> |
| <command> | |
| -m 1 telnet://%HOSTIP:%HTTPPORT | |
| </command> | |