Re: [systemd-devel] [PATCH] gssd: Improve scalability by not waiting for child processes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Steve Dickson:

> +static void
> +sig_child(int signal)
> +{
> +	int err;
> +	pid_t pid;
> +
> +	/* Parent: just wait on child to exit and return */
> +	do {
> +		pid = wait(&err);
> +	} while(pid == -1 && errno != -ECHILD);
> +
> +	if (WIFSIGNALED(err))
> +		printerr(0, "WARNING: forked child was killed"
> +			 "with signal %d\n", WTERMSIG(err));
> +}

prinerr calls vfprintf or vsyslog.  Neither is safe to use in signal
handlers, so you need to log this message in some other way.

Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux