* [PATCH 1/1] checkpoint: define pid==0 as self-checkpoint
@ 2009-03-05 17:49 Serge E. Hallyn
2009-03-05 18:23 ` Dan Smith
0 siblings, 1 reply; 2+ messages in thread
From: Serge E. Hallyn @ 2009-03-05 17:49 UTC (permalink / raw)
To: Oren Laadan, Dave Hansen; +Cc: Linux Containers, lkml
[ 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] checkpoint: define pid==0 as self-checkpoint
2009-03-05 17:49 [PATCH 1/1] checkpoint: define pid==0 as self-checkpoint Serge E. Hallyn
@ 2009-03-05 18:23 ` Dan Smith
0 siblings, 0 replies; 2+ messages in thread
From: Dan Smith @ 2009-03-05 18:23 UTC (permalink / raw)
To: Serge E. Hallyn; +Cc: Oren Laadan, Dave Hansen, Linux Containers, lkml
SH> Define pid=0 when calling sys_checkpoint as asking for a
SH> self-checkpoint.
Works for me (of course).
--
Dan Smith
IBM Linux Technology Center
email: danms@us.ibm.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-05 18:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-05 17:49 [PATCH 1/1] checkpoint: define pid==0 as self-checkpoint Serge E. Hallyn
2009-03-05 18:23 ` Dan Smith
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox