From: Oren Laadan <orenl-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org>
To: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: Linux Containers <containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org>
Subject: Re: [PATCH user-cr] return, don't exist, at coord error
Date: Sun, 18 Oct 2009 22:57:23 -0400 [thread overview]
Message-ID: <4ADBD593.9070006@librato.com> (raw)
In-Reply-To: <20091019022942.GA21306-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
What was the command line you used for the restart ?
Oren.
Serge E. Hallyn wrote:
> All right I can't explain it at the moment, but exit(1) at
> ckpt_coordinator() (on error) causes restart.c to exit with 0,
> whereas return(ret) causes it to correctly exit with -1.
>
> Without this, a restart whose kernel portion ends with say
> -1 ends up returning from user-cr/restart.c with 0, so userspace
> can't tell whether sys_restart succeeded or failed. With the
> patch, it fails correctly.
>
> Signed-off-by: Serge E. Hallyn <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
> ---
> restart.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/restart.c b/restart.c
> index e6e72ac..87899ba 100644
> --- a/restart.c
> +++ b/restart.c
> @@ -933,7 +933,7 @@ static int ckpt_coordinator(struct ckpt_ctx *ctx)
> perror("restart failed");
> ckpt_verbose("Failed\n");
> ckpt_dbg("restart failed ?\n");
> - exit(1);
> + return ret;
> }
>
> ckpt_verbose("Success\n");
next prev parent reply other threads:[~2009-10-19 2:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-19 2:29 [PATCH user-cr] return, don't exist, at coord error Serge E. Hallyn
[not found] ` <20091019022942.GA21306-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-10-19 2:57 ` Oren Laadan [this message]
[not found] ` <4ADBD593.9070006-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org>
2009-10-19 3:50 ` Serge E. Hallyn
[not found] ` <20091019035033.GA23390-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-10-19 4:41 ` 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=4ADBD593.9070006@librato.com \
--to=orenl-rdfvbdnroixbdgjk7y7tuq@public.gmane.org \
--cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
--cc=serue-r/Jw6+rmf7HQT0dZR+AlfA@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