All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] credential-cache: close stderr in daemon process
Date: Tue, 16 Sep 2014 11:10:29 -0700	[thread overview]
Message-ID: <xmqqtx47308a.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20140916002825.GD5019@peff.net> (Jeff King's message of "Mon, 15 Sep 2014 20:28:25 -0400")

Jeff King <peff@peff.net> writes:

> Squash this in?

Yeah, I did a crude one without _errno() while sending the report;
will replace.

Thanks.

>
> diff --git a/credential-cache--daemon.c b/credential-cache--daemon.c
> index c07a67c..c2f0049 100644
> --- a/credential-cache--daemon.c
> +++ b/credential-cache--daemon.c
> @@ -212,8 +212,10 @@ static void serve_cache(const char *socket_path, int debug)
>  
>  	printf("ok\n");
>  	fclose(stdout);
> -	if (!debug)
> -		freopen("/dev/null", "w", stderr);
> +	if (!debug) {
> +		if (!freopen("/dev/null", "w", stderr))
> +			die_errno("unable to point stderr to /dev/null");
> +	}
>  
>  	while (serve_cache_loop(fd))
>  		; /* nothing */

      reply	other threads:[~2014-09-16 18:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-14  7:35 [PATCH] credential-cache: close stderr in daemon process Jeff King
2014-09-15 21:38 ` Junio C Hamano
2014-09-16  0:28   ` Jeff King
2014-09-16 18:10     ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqtx47308a.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.