Exemple #1
0
pid_t
subproc_fork(void)
{
	pid_t pid;

	pid = fork();
	if (pid == -1) {
		onerr_abort++;
		ohshite(_("fork failed"));
	}
	if (pid > 0)
		return pid;

	/* Push a new error context, so that we don't do the other cleanups,
	 * because they'll be done by/in the parent process. */
	push_error_context_func(catch_fatal_error, print_subproc_error, NULL);

	return pid;
}
Exemple #2
0
void
push_error_context(void)
{
  push_error_context_func(catch_fatal_error, print_fatal_error, NULL);
}