From: Richard Weinberger <richard@nod.at>
To: vitalivanov@gmail.com
Cc: Jeff Dike <jdike@addtoit.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"user-mode-linux-devel@lists.sourceforge.net"
<user-mode-linux-devel@lists.sourceforge.net>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/4] uml: helper.c warning corrections
Date: Tue, 5 Jul 2011 11:42:39 +0200 [thread overview]
Message-ID: <201107051142.39733.richard@nod.at> (raw)
In-Reply-To: <1309821347.4527.6.camel@vitaliy-Vostro-1400>
Am Dienstag 05 Juli 2011, 01:15:47 schrieb Vitaliy Ivanov:
> From 7296c5b9770e95cd6ad4e9e71d2d14c972abdfe1 Mon Sep 17 00:00:00 2001
> From: Vitaliy Ivanov <vitalivanov@gmail.com>
> Date: Tue, 5 Jul 2011 02:03:06 +0300
> Subject: [PATCH 2/4] uml: helper.c warning corrections
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> arch/um/os-Linux/helper.c: In function ‘helper_child’:
> arch/um/os-Linux/helper.c:38:7: warning: ignoring return value of ‘write’,
> declared with attribute warn_unused_result
Same question as before...
> Signed-off-by: Vitaliy Ivanov <vitalivanov@gmail.com>
> ---
> arch/um/os-Linux/helper.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/um/os-Linux/helper.c b/arch/um/os-Linux/helper.c
> index b6b1096..feff22d 100644
> --- a/arch/um/os-Linux/helper.c
> +++ b/arch/um/os-Linux/helper.c
> @@ -28,14 +28,14 @@ static int helper_child(void *arg)
> {
> struct helper_data *data = arg;
> char **argv = data->argv;
> - int err;
> + int err, ret;
>
> if (data->pre_exec != NULL)
> (*data->pre_exec)(data->pre_data);
> err = execvp_noalloc(data->buf, argv[0], argv);
>
> /* If the exec succeeds, we don't get here */
> - write(data->fd, &err, sizeof(err));
> + CATCH_EINTR(ret = write(data->fd, &err, sizeof(err)));
Is there really a realistic chance that this write() can be interrupted?
helper_child() gets called via clone() in run_helper().
Thanks,
//richard
next prev parent reply other threads:[~2011-07-05 9:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-04 23:15 Vitaliy Ivanov
2011-07-05 9:42 ` Richard Weinberger [this message]
2011-07-05 11:45 ` Vitaliy Ivanov
2011-07-05 12:02 ` Richard Weinberger
2011-07-05 12:28 ` Vitaliy Ivanov
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=201107051142.39733.richard@nod.at \
--to=richard@nod.at \
--cc=akpm@linux-foundation.org \
--cc=jdike@addtoit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=user-mode-linux-devel@lists.sourceforge.net \
--cc=vitalivanov@gmail.com \
/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
Powered by JetHome