Re: [PATCH] diff-tree: stop on broken output pipe

From: Junio C Hamano <junkio@cox.net>
Date: 2006-01-07 09:36:50
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> 	Without this, on my iBook git-whatchanged keeps running when I 
> 	quit "less". I have to interrupt the process a second time. No
> 	idea why it works on Linux.
>
> -		if (!no_commit_id)
> -			printf("%s%c", header, diff_options.line_termination);
> +		if (!no_commit_id && printf("%s%c", header,
> +				diff_options.line_termination) < 0)
> +			die("broken output pipe");
>  		header = NULL;

There are tons of output other than this printf() and catching
an output error only on this one and assuming that is a broken
pipe somehow feels doubly wrong to me.

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Sat Jan 07 09:38:07 2006

This archive was generated by hypermail 2.1.8 : 2006-01-07 09:38:24 EST