Linux Container Development
 help / color / mirror / Atom feed
From: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
To: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: [PATCH 0/9] user-cr: support for pids as shared objects
Date: Wed, 26 Jan 2011 11:24:20 -0500	[thread overview]
Message-ID: <4D404AB4.2010208@cs.columbia.edu> (raw)
In-Reply-To: <1296058748-21418-2-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>


[Hmm.. here too the cover was lost .. need to investigate]

Hi,   
      
This patchset adds the necessary support in user-cr related to
handling of pids as proper shared objets. You must use this if you use
the corresponding kernel-cr patchset recetly posted.

Thanks,

Oren.


On 01/26/2011 11:19 AM, Oren Laadan wrote:
> The initialization belongs to the caller of the cr-library - i.e.
> restart-main and checkpoint-main, and not in the cr-library.
> 
> Signed-off-by: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
> ---
>  checkpoint-main.c |    4 ++--
>  checkpoint.c      |    8 --------
>  restart-main.c    |    4 ++--
>  3 files changed, 4 insertions(+), 12 deletions(-)
> 
> diff --git a/checkpoint-main.c b/checkpoint-main.c
> index a2a7d94..b2ec9c8 100644
> --- a/checkpoint-main.c
> +++ b/checkpoint-main.c
> @@ -70,8 +70,8 @@ static void parse_args(struct cr_checkpoint_args *args, int argc, char *argv[])
>  	char *logfile;
>  
>  	/* defaults */
> -	args->outfd = -1;
> -	args->logfd = -1;
> +	args->outfd = fileno(stdout);
> +	args->logfd = CHECKPOINT_FD_NONE;
>  	args->uerrfd = fileno(stderr);
>  	output = NULL;
>  	logfile = NULL;
> diff --git a/checkpoint.c b/checkpoint.c
> index cce3d9d..f9b0b3b 100644
> --- a/checkpoint.c
> +++ b/checkpoint.c
> @@ -37,14 +37,6 @@ int cr_checkpoint(int pid, struct cr_checkpoint_args *args)
>  
>  	global_uerrfd = args->uerrfd;
>  
> -	/* output file descriptor (default: stdout) */
> -	if (args->outfd < 0)
> -		args->outfd = STDOUT_FILENO;
> -
> -	/* output file descriptor (default: none) */
> -	if (args->logfd < 0)
> -		args->logfd = CHECKPOINT_FD_NONE;
> -
>  	if (!args->container)
>  		args->flags |= CHECKPOINT_SUBTREE;
>  
> diff --git a/restart-main.c b/restart-main.c
> index 6eed101..efa6a8f 100644
> --- a/restart-main.c
> +++ b/restart-main.c
> @@ -146,10 +146,10 @@ static void parse_args(struct cr_restart_args *args, int argc, char *argv[])
>  	/* defaults */
>  	memset(args, 0, sizeof(*args));
>  	args->wait = 1;
> -	args->infd = -1;
> -	args->klogfd = -1;
> +	args->infd = fileno(stdin);
>  	args->ulogfd = fileno(stdout);
>  	args->uerrfd = fileno(stderr);
> +	args->klogfd = CHECKPOINT_FD_NONE;
>  	args->warn = CKPT_COND_WARN;
>  	args->fail = CKPT_COND_FAIL;
>  	no_pidns = 0;

  parent reply	other threads:[~2011-01-26 16:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-26 16:18 [PATCH 0/9] user-cr: support for pids as shared objects Oren Laadan
     [not found] ` <1296058748-21418-1-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2011-01-26 16:19   ` [PATCH 1/9] Initialize of args->{outfd, logfd, infd} in main c/r programs Oren Laadan
     [not found]     ` <1296058748-21418-2-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2011-01-26 16:24       ` Oren Laadan [this message]
2011-01-26 16:19   ` [PATCH 2/9] Introduce ctx->error to improve error reporting Oren Laadan
2011-01-26 16:19   ` [PATCH 3/9] restart: cleanup setup/cleanup of freezer cgroups Oren Laadan
2011-01-26 16:19   ` [PATCH 4/9] restart: make feeder a proper child instead of a thread Oren Laadan
2011-01-26 16:19   ` [PATCH 5/9] restart: obtain pid_max from /proc/sys/kernel/pid_max Oren Laadan
2011-01-26 16:19   ` [PATCH 6/9] restart: rename 'ctx->tasks_arr' to 'ctx->tasks' Oren Laadan
2011-01-26 16:19   ` [PATCH 7/9] udpate kernel headers: support for pids objects Oren Laadan
2011-01-26 16:19   ` [PATCH 8/9] ckptinfo: s/ckpt_pids/ckpt_task_pids/ after kerenl header update Oren Laadan
2011-01-26 16:19   ` [PATCH 9/9] restart: fix support for nested pid namespaces Oren Laadan

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=4D404AB4.2010208@cs.columbia.edu \
    --to=orenl-eqauephvms7envbuuze7ea@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@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