コード例 #1
0
ファイル: pax.c プロジェクト: MirBSD/mircpio
void
sig_cleanup(int which_sig)
{
	/*
	 * Restore modes and times for any dirs we may have created
	 * or any dirs we may have read. Set vflag and vfpart so the
	 * user will clearly see the message on a line by itself.
	 */
	vflag = vfpart = 1;

	/* paxwarn() uses stdio; fake it as well as we can */
	if (which_sig == SIGXCPU)
		dprintf(STDERR_FILENO, "\nCPU time limit reached, cleaning up.\n");
	else if (!which_sig)
		dprintf(STDERR_FILENO, "\nCowardly giving up, trying to clean up.\n");
	else
		dprintf(STDERR_FILENO, "\nSignal caught, cleaning up.\n");

	ar_close(1);
	sltab_process(1);
	proc_dir(1);
	if (tflag)
		atdir_end();
	_exit(1);
}
コード例 #2
0
ファイル: pax.c プロジェクト: camomiles/eou
void
sig_cleanup(int which_sig)
{
	char errbuf[80];

	/*
	 * restore modes and times for any dirs we may have created
	 * or any dirs we may have read.
	 */

	/* paxwarn() uses stdio; fake it as well as we can */
	if (which_sig == SIGXCPU)
		strlcpy(errbuf, "\nCPU time limit reached, cleaning up.\n",
		    sizeof errbuf);
	else
		strlcpy(errbuf, "\nSignal caught, cleaning up.\n",
		    sizeof errbuf);
	(void) write(STDERR_FILENO, errbuf, strlen(errbuf));

	ar_close(1);
	sltab_process(1);
	proc_dir(1);
	if (tflag)
		atdir_end();
	_exit(1);
}
コード例 #3
0
ファイル: pax.c プロジェクト: a565109863/src
void
sig_cleanup(int which_sig)
{
	/*
	 * restore modes and times for any dirs we may have created
	 * or any dirs we may have read.
	 */

	/* paxwarn() uses stdio; fake it as well as we can */
	if (which_sig == SIGXCPU)
		dprintf(STDERR_FILENO, "\nCPU time limit reached, cleaning up.\n");
	else
		dprintf(STDERR_FILENO, "\nSignal caught, cleaning up.\n");

	ar_close(1);
	sltab_process(1);
	proc_dir(1);
	if (tflag)
		atdir_end();
	_exit(1);
}