コード例 #1
0
ファイル: write_or_die.c プロジェクト: 0369/git
static void check_pipe(int err)
{
	if (err == EPIPE) {
		if (in_async())
			async_exit(141);

		signal(SIGPIPE, SIG_DFL);
		raise(SIGPIPE);
		/* Should never happen, but just in case... */
		exit(141);
	}
}
コード例 #2
0
ファイル: run-command.c プロジェクト: 1742314348/git
static NORETURN void die_async(const char *err, va_list params)
{
	vreportf("fatal: ", err, params);

	if (in_async()) {
		struct async *async = pthread_getspecific(async_key);
		if (async->proc_in >= 0)
			close(async->proc_in);
		if (async->proc_out >= 0)
			close(async->proc_out);
		pthread_exit((void *)128);
	}

	exit(128);
}
コード例 #3
0
ファイル: pkt-line.c プロジェクト: Litttle-butterfly/git
static const char *get_trace_prefix(void)
{
	return in_async() ? "sideband" : packet_trace_prefix;
}