From: Daniel Stenberg Date: Mon, 26 Aug 2002 11:58:18 +0000 (+0000) Subject: don't close stdin, close the actual file handle we have! X-Git-Tag: curl-7_10~86 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=752520e42834b6527bd8ae6cb43b67389d9d2b63;p=curl don't close stdin, close the actual file handle we have! Keith MacDonald found it. --- diff --git a/src/main.c b/src/main.c index a7533a00f..956cb861a 100644 --- a/src/main.c +++ b/src/main.c @@ -1318,7 +1318,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ else postdata = file2string(file); if(file && (file != stdin)) - fclose(stdin); + fclose(file); } else { GetStr(&postdata, nextarg); @@ -1626,7 +1626,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ file = fopen(nextarg, "r"); config->writeout = file2string(file); if(file && (file != stdin)) - fclose(stdin); + fclose(file); } else GetStr(&config->writeout, nextarg);