From: jeremie.galarneau@efficios.com (Jérémie Galarneau)
Subject: [lttng-dev] [PATCH lttng-tools] Fix: save: close fd of configuration file
Date: Wed, 19 Oct 2016 15:49:06 -0400 [thread overview]
Message-ID: <CA+jJMxt2s-U_bmGyHWEzsGjSznFOoSL+u-3k_j3ifbJq-djrtw@mail.gmail.com> (raw)
In-Reply-To: <1476828593-8761-1-git-send-email-jonathan.rajotte-julien@efficios.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1616 bytes --]
Merged in master, 2.9, 2.8 and 2.7.
Thanks!
Jérémie
On 18 October 2016 at 18:09, Jonathan Rajotte
<jonathan.rajotte-julien at efficios.com> wrote:
> Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien at efficios.com>
> ---
> src/bin/lttng-sessiond/save.c | 7 +++++++
> src/common/config/session-config.h | 4 ++--
> 2 files changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/src/bin/lttng-sessiond/save.c b/src/bin/lttng-sessiond/save.c
> index 9ac7712..1a879b2 100644
> --- a/src/bin/lttng-sessiond/save.c
> +++ b/src/bin/lttng-sessiond/save.c
> @@ -2053,6 +2053,13 @@ end:
> }
> }
>
> + if (file_opened) {
> + ret = close(fd);
> + if (ret) {
> + PERROR("Closing XML session configuration");
> + }
> + }
> +
> return ret;
> }
>
> diff --git a/src/common/config/session-config.h b/src/common/config/session-config.h
> index c6439f7..f48ff74 100644
> --- a/src/common/config/session-config.h
> +++ b/src/common/config/session-config.h
> @@ -85,8 +85,8 @@ int config_parse_value(const char *value);
> /*
> * Create an instance of a configuration writer.
> *
> - * fd_output File to which the XML content must be written. The file will be
> - * closed once the config_writer has been destroyed.
> + * fd_output File to which the XML content must be written. fd_output is
> + * owned by the caller.
> *
> * indent If other than 0 the XML will be pretty printed
> * with indentation and newline.
> --
> 2.7.4
>
--
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com
prev parent reply other threads:[~2016-10-19 19:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-18 22:09 Jonathan Rajotte
2016-10-18 22:13 ` Jonathan Rajotte Julien
2016-10-19 19:49 ` Jérémie Galarneau [this message]
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=CA+jJMxt2s-U_bmGyHWEzsGjSznFOoSL+u-3k_j3ifbJq-djrtw@mail.gmail.com \
--to=jeremie.galarneau@efficios.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