Linux Container Development
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: [PATCH 1/4] Add -P <pid-file> option to ns_exec
Date: Thu, 21 May 2009 11:35:40 -0500	[thread overview]
Message-ID: <20090521163540.GA18281@us.ibm.com> (raw)

Quoting sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org (sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org):
> From: Sukadev Bhattiprolu <sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
> 
> ns_exec knows the pid of the container-init in its own namespace (this
> is usually the global pid since we normally run ns_exec in init-pid-ns).
> If ns_exec writes out this "global" pid to a file, wrapper scripts can
> find the process they created more easily.
> 
> killall and pidof assume that all previous instances of the test program
> have thawed and exited gracefully :-) As such they are not very friendly
> during early testing and/or complicate the wrapper scripts.
> 
> Signed-off-by: Sukadev Bhattiprolu <sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
> ---
>  ns_exec.c |   28 ++++++++++++++++++++++++++--
>  1 files changed, 26 insertions(+), 2 deletions(-)
> 
> diff --git a/ns_exec.c b/ns_exec.c
> index 5d5cca3..d15daa0 100644
> --- a/ns_exec.c
> +++ b/ns_exec.c
> @@ -24,7 +24,7 @@ static const char* procname;
> 
>  static void usage(const char *name)
>  {
> -	printf("usage: %s [-h] [-c] [-muip]"
> +	printf("usage: %s [-h] [-c] [-muip] [-P <pid-file>]"
>  			"[command [arg ..]]\n", name);
>  	printf("\n");
>  	printf("  -h		this message\n");
> @@ -33,6 +33,7 @@ static void usage(const char *name)
>  	printf("  -m		mount namespace\n");
>  	printf("  -u		utsname namespace\n");
>  	printf("  -i		ipc namespace\n");
> +	printf("  -P <pid-file>	File in which to write global pid of cinit\n");

We probably don't care, but it's not necessarily the global pid.

Applying as is, bc I can't think of a better adjective.

thanks,
-serge

                 reply	other threads:[~2009-05-21 16:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20090521163540.GA18281@us.ibm.com \
    --to=serue-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox