aboutsummaryrefslogtreecommitdiff
path: root/gdb/darwin-nat.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2021-07-22 15:33:42 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2021-09-30 15:21:48 -0400
commit2fed9db40b1179f62c6fb0f2cacfb0db6b50af46 (patch)
treed47c517c106ec8bc88b6733d2b26f54f50dfec7c /gdb/darwin-nat.c
parent13084383e8955c2ff7017ac8839301688a9ee34d (diff)
downloadfsf-binutils-gdb-2fed9db40b1179f62c6fb0f2cacfb0db6b50af46.zip
fsf-binutils-gdb-2fed9db40b1179f62c6fb0f2cacfb0db6b50af46.tar.gz
fsf-binutils-gdb-2fed9db40b1179f62c6fb0f2cacfb0db6b50af46.tar.bz2
gdbsupport: make gdb_mkostemp_cloexec return a scoped_fd
This encourages the callers to use automatic file descriptor management. Change-Id: I137a81df6f3607b457e28c35aafde8ed6f3a3344
Diffstat (limited to 'gdb/darwin-nat.c')
-rw-r--r--gdb/darwin-nat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c
index 525f59a..141eede 100644
--- a/gdb/darwin-nat.c
+++ b/gdb/darwin-nat.c
@@ -1833,7 +1833,7 @@ copy_shell_to_cache (const char *shell, const std::string &new_name)
new_dir.c_str (), safe_strerror (errno));
gdb::char_vector temp_name = make_temp_filename (new_name);
- scoped_fd to_fd (gdb_mkostemp_cloexec (&temp_name[0]));
+ scoped_fd to_fd = gdb_mkostemp_cloexec (&temp_name[0]);
gdb::unlinker unlink_file_on_error (temp_name.data ());
if (to_fd.get () < 0)