From: "Serge E. Hallyn" <serue@us.ibm.com>
To: Oren Laadan <orenl@cs.columbia.edu>, Dave Hansen <haveblue@us.ibm.com>
Cc: Linux Containers <containers@lists.osdl.org>,
lkml <linux-kernel@vger.kernel.org>
Subject: [PATCH 1/1] checkpoint: define pid==0 as self-checkpoint
Date: Thu, 5 Mar 2009 11:49:51 -0600 [thread overview]
Message-ID: <20090305174951.GA9782@us.ibm.com> (raw)
[ this is on top of Dave's version of Oren's patchset, i.e.
http://git.kernel.org/gitweb.cgi?p=linux/kernel/git/daveh/linux-2.6-cr.git;a=shortlog;h=dave-v13.4 ]
Define pid=0 when calling sys_checkpoint as asking for
a self-checkpoint.
Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
---
checkpoint/sys.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/checkpoint/sys.c b/checkpoint/sys.c
index 4a51ed3..acc5121 100644
--- a/checkpoint/sys.c
+++ b/checkpoint/sys.c
@@ -224,6 +224,8 @@ asmlinkage long sys_checkpoint(pid_t pid, int fd, unsigned long flags)
if (flags)
return -EINVAL;
+ if (pid == 0)
+ pid = current->pid;
ctx = cr_ctx_alloc(fd, flags | CR_CTX_CKPT);
if (IS_ERR(ctx))
return PTR_ERR(ctx);
--
1.5.4.3
next reply other threads:[~2009-03-05 17:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-05 17:49 Serge E. Hallyn [this message]
2009-03-05 18:23 ` [PATCH 1/1] checkpoint: define pid==0 as self-checkpoint Dan Smith
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=20090305174951.GA9782@us.ibm.com \
--to=serue@us.ibm.com \
--cc=containers@lists.osdl.org \
--cc=haveblue@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=orenl@cs.columbia.edu \
/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.