From: Pedro Alves <palves@redhat.com>
To: Philippe Waroquiers <philippe.waroquiers@skynet.be>,
gdb-patches@sourceware.org
Subject: Re: [RFAv3 4/6] Implement | (pipe) command.
Date: Mon, 27 May 2019 17:55:00 -0000 [thread overview]
Message-ID: <e530cd3d-c99b-2422-4e10-bff3b9b8ac5c@redhat.com> (raw)
In-Reply-To: <c61a8867-ca4f-135f-5141-ff805d98ca0d@redhat.com>
On 5/27/19 6:48 PM, Pedro Alves wrote:
> stdio_file's destructor calls fclose unless you tell it otherwise:
>
> /* Create a ui_file from a previously opened FILE. CLOSE_P
> indicates whether the underlying file should be closed when the
> stdio_file is destroyed. */
> explicit stdio_file (FILE *file, bool close_p = false);
>
>> +
>> + execute_command_to_ui_file (&pipe_file, gdb_cmd.c_str (), from_tty);
> So here this is calling fclose before leaving the scope. But popen
> FILE's should be closed with pclose, only. I don't know why it isn't
> causing problems, may be the glibc's fclose does nothing in this case.
> We shouldn't rely on that.
>
Ahahaha. The argument defaults to false, not true. Silly me.
Thanks,
Pedro Alves
prev parent reply other threads:[~2019-05-27 17:55 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-04 16:18 [RFAv3 0/6] " Philippe Waroquiers
2019-05-04 16:18 ` [RFAv3 2/6] Improve process exit status macros on MinGW Philippe Waroquiers
2019-05-27 17:33 ` Pedro Alves
2019-05-27 18:38 ` Eli Zaretskii
2019-05-29 12:38 ` Pedro Alves
2019-05-29 15:03 ` Eli Zaretskii
2019-05-30 10:26 ` Philippe Waroquiers
2019-12-17 17:00 ` Eli Zaretskii
2019-12-17 17:51 ` Pedro Alves
2019-12-18 17:08 ` Eli Zaretskii
2019-12-18 17:42 ` Pedro Alves
2019-12-18 18:33 ` Eli Zaretskii
2019-12-25 15:57 ` Eli Zaretskii
2020-01-03 19:59 ` Pedro Alves
2020-01-03 20:08 ` Pedro Alves
2020-01-03 20:34 ` Eli Zaretskii
2020-01-06 11:57 ` Pedro Alves
2020-01-06 16:17 ` Eli Zaretskii
2020-01-06 18:51 ` Pedro Alves
2020-01-06 19:26 ` Eli Zaretskii
2020-01-06 18:59 ` Hannes Domani via gdb-patches
2020-01-06 19:34 ` Eli Zaretskii
2020-01-06 19:38 ` Hannes Domani via gdb-patches
2020-01-06 19:55 ` Eli Zaretskii
2020-01-03 17:04 ` Pedro Alves
2019-05-04 16:18 ` [RFAv3 6/6] NEWS and documentation for | (pipe) command Philippe Waroquiers
2019-05-04 16:26 ` Eli Zaretskii
2019-05-04 16:33 ` Eli Zaretskii
2019-05-27 17:51 ` Pedro Alves
2019-05-04 16:18 ` [RFAv3 3/6] Add function execute_command_to_ui_file Philippe Waroquiers
2019-05-04 16:18 ` [RFAv3 1/6] Add previous_saved_command_line to allow a command to repeat a previous command Philippe Waroquiers
2019-05-27 17:29 ` Pedro Alves
2019-05-04 16:18 ` [RFAv3 5/6] Test the | (pipe) command Philippe Waroquiers
2019-05-27 17:49 ` Pedro Alves
2019-05-04 16:18 ` [RFAv3 4/6] Implement " Philippe Waroquiers
2019-05-27 17:48 ` Pedro Alves
2019-05-27 17:55 ` Pedro Alves [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=e530cd3d-c99b-2422-4e10-bff3b9b8ac5c@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=philippe.waroquiers@skynet.be \
/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