From: Simon Marchi <simark@simark.ca>
To: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [RFC 5/6] Do not reopen temporary files
Date: Sat, 29 Sep 2018 03:22:00 -0000 [thread overview]
Message-ID: <ef37ad49-a1bd-93fd-1766-10cee8a00108@simark.ca> (raw)
In-Reply-To: <20180926111130.18956-6-tom@tromey.com>
On 2018-09-26 7:11 a.m., Tom Tromey wrote:
> diff --git a/gdb/dwarf-index-write.c b/gdb/dwarf-index-write.c
> index 7049e8968a..341e16bfc5 100644
> --- a/gdb/dwarf-index-write.c
> +++ b/gdb/dwarf-index-write.c
> @@ -1565,23 +1565,21 @@ write_psymtabs_to_index (struct dwarf2_per_objfile *dwarf2_per_objfile,
> ? INDEX5_SUFFIX : INDEX4_SUFFIX));
> gdb::char_vector filename_temp = make_temp_filename (filename);
>
> - gdb::optional<scoped_fd> out_file_fd
> - (gdb::in_place, gdb_mkstemp_cloexec (filename_temp.data ()));
> - if (out_file_fd->get () == -1)
> + /* Order matters here; we want FILE to be closed before FILENAME_TEMP is
> + unlinked, because on MS-Windows one cannot delete a file that is
> + still open. (Don't call anything here that might throw until
> + file_closer is created.) So, we wrap the unlinker in an optional
I just noticed this refers to file_closer, a variable that doesn't exist anymore
(or has been renamed).
Otherwise this LGTM.
Simon
next prev parent reply other threads:[~2018-09-29 3:22 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-26 11:12 [RFC 0/6] A different approach to startup-with-shell on macOS Tom Tromey
2018-09-26 11:11 ` [RFC 1/6] Unify shell-finding logic Tom Tromey
2018-09-28 21:39 ` Simon Marchi
2018-09-26 11:12 ` [RFC 4/6] Use mkostemp, not mkstemp Tom Tromey
2018-09-29 3:09 ` Simon Marchi
2018-09-29 12:49 ` Tom Tromey
2018-09-29 14:04 ` Simon Marchi
2018-09-26 11:12 ` [RFC 2/6] Move make_temp_filename to common/pathstuff.c Tom Tromey
2018-09-26 11:12 ` [RFC 5/6] Do not reopen temporary files Tom Tromey
2018-09-26 14:12 ` Eli Zaretskii
2018-09-26 21:44 ` Tom Tromey
2018-09-29 3:22 ` Simon Marchi [this message]
2018-10-01 9:15 ` Tom Tromey
2018-09-26 11:20 ` [RFC 6/6] Cache a copy of the user's shell on macOS Tom Tromey
2018-09-29 3:37 ` Simon Marchi
2018-10-01 19:27 ` Tom Tromey
2018-10-01 19:31 ` Simon Marchi
2018-09-26 11:20 ` [RFC 3/6] Move mkdir_recursive to common/filestuff.c Tom Tromey
2018-09-26 22:11 ` Tom Tromey
2018-09-26 23:16 ` Tom Tromey
2018-09-28 21:21 ` [RFC 0/6] A different approach to startup-with-shell on macOS Simon Marchi
2018-09-29 18:43 ` Pedro Alves
2018-09-29 19:50 ` Simon Marchi
2018-09-29 20:38 ` Pedro Alves
2018-10-01 9:12 ` Tom Tromey
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=ef37ad49-a1bd-93fd-1766-10cee8a00108@simark.ca \
--to=simark@simark.ca \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.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