All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Weimer <fw@deneb.enyo.de>
To: Steve Dickson <steved@redhat.com>
Cc: Linux NFS Mailing list <linux-nfs@vger.kernel.org>,
	Systemd Mailing List <systemd-devel@lists.freedesktop.org>
Subject: Re: [systemd-devel] [PATCH] gssd: Improve scalability by not waiting for child processes
Date: Sun, 04 Oct 2015 10:19:59 +0200	[thread overview]
Message-ID: <874mi7yrio.fsf@mid.deneb.enyo.de> (raw)
In-Reply-To: <1443043250-25703-1-git-send-email-steved@redhat.com> (Steve Dickson's message of "Wed, 23 Sep 2015 17:20:50 -0400")

* 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

  parent reply	other threads:[~2015-10-04  8:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-23 21:20 [PATCH] gssd: Improve scalability by not waiting for child processes Steve Dickson
2015-09-25 10:53 ` Jeff Layton
2015-09-26 13:55   ` Steve Dickson
2015-09-26 13:59     ` Jeff Layton
2015-09-25 11:13 ` Jeff Layton
2015-10-04  8:19 ` Florian Weimer [this message]
2015-10-05 11:50   ` [systemd-devel] " Steve Dickson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874mi7yrio.fsf@mid.deneb.enyo.de \
    --to=fw@deneb.enyo.de \
    --cc=linux-nfs@vger.kernel.org \
    --cc=steved@redhat.com \
    --cc=systemd-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.