mirror of
https://github.com/curl/curl.git
synced 2026-08-25 13:53:37 +03:00
tool: improve --stderr handling
- freopen stderr with the user-specified file (--stderr file) instead of using a separate 'errors' stream. - In tool_setup.h override stdio.h's stderr macro as global variable tool_stderr. Both freopen and overriding the stderr macro are necessary because if the user-specified filename is "-" then stdout is assigned to tool_stderr and no freopen takes place. See the PR for more information. Ref: https://github.com/curl/curl/issues/10491 Closes https://github.com/curl/curl/pull/10673
This commit is contained in:
parent
395b9175b7
commit
2f17a9b654
14 changed files with 151 additions and 60 deletions
|
|
@ -82,6 +82,7 @@ CURL_CFILES = \
|
|||
tool_paramhlp.c \
|
||||
tool_parsecfg.c \
|
||||
tool_progress.c \
|
||||
tool_stderr.c \
|
||||
tool_strdup.c \
|
||||
tool_setopt.c \
|
||||
tool_sleep.c \
|
||||
|
|
@ -126,6 +127,7 @@ CURL_HFILES = \
|
|||
tool_setopt.h \
|
||||
tool_setup.h \
|
||||
tool_sleep.h \
|
||||
tool_stderr.h \
|
||||
tool_strdup.h \
|
||||
tool_urlglob.h \
|
||||
tool_util.h \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue