On 10/04/2015 04:19 AM, Florian Weimer wrote:
> * 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();
>> +} while(pid == -1 && errno
* 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();
> + } while(pid == -1 && errno != -ECHILD);
> +
> + if (WIFSIGNALED(err))
> +
Instead of waiting on every fork, which would
become a bottle neck during a mount storm, simply
set a SIGCHLD signal handler to do the wait on
the child process
Signed-off-by: Steve Dickson
---
utils/gssd/gssd.c | 18 ++
utils/gssd/gssd_proc.c | 11