[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 07/60] linux-user/elfload: Truncate core file on open
From: |
Richard Henderson |
Subject: |
[PATCH 07/60] linux-user/elfload: Truncate core file on open |
Date: |
Fri, 1 Mar 2024 13:05:26 -1000 |
While we usually create a new corefile, truncate otherwise.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
linux-user/elfload.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 877799e9c7..16dd08a828 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -4652,7 +4652,7 @@ static int elf_core_dump(int signr, const CPUArchState
*env)
{
g_autofree char *corefile = core_dump_filename(ts);
- fd = open(corefile, O_WRONLY | O_CREAT,
+ fd = open(corefile, O_WRONLY | O_CREAT | O_TRUNC,
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
}
if (fd < 0) {
--
2.34.1
- [PATCH 16/60] accel/tcg: Set can_do_io at at start of lookup_tb_ptr helper, (continued)
- [PATCH 16/60] accel/tcg: Set can_do_io at at start of lookup_tb_ptr helper, Richard Henderson, 2024/03/01
- [PATCH 06/60] linux-user/elfload: Open core file after vma_init, Richard Henderson, 2024/03/01
- [PATCH 09/60] linux-user/elfload: Size corefile before opening, Richard Henderson, 2024/03/01
- [PATCH 14/60] linux-user/elfload: Unprotect regions before core dump, Richard Henderson, 2024/03/01
- [PATCH 25/60] linux-user: Remove qemu_host_page_size from elf_core_dump, Richard Henderson, 2024/03/01
- [PATCH 19/60] linux-user: Adjust SVr4 NULL page mapping, Richard Henderson, 2024/03/01
- [PATCH 12/60] linux-user/elfload: Simplify vma_dump_size, Richard Henderson, 2024/03/01
- [PATCH 18/60] accel/tcg: Remove qemu_host_page_size from page_protect/page_unprotect, Richard Henderson, 2024/03/01
- [PATCH 26/60] linux-user: Remove qemu_host_page_{size, mask} from mmap.c, Richard Henderson, 2024/03/01
- [PATCH 28/60] linux-user: Remove HOST_PAGE_ALIGN from mmap.c, Richard Henderson, 2024/03/01
- [PATCH 07/60] linux-user/elfload: Truncate core file on open,
Richard Henderson <=
- [PATCH 20/60] linux-user: Remove qemu_host_page_{size, mask} in probe_guest_base, Richard Henderson, 2024/03/01
- [PATCH 23/60] linux-user/nios2: Remove qemu_host_page_size from init_guest_commpage, Richard Henderson, 2024/03/01
- [PATCH 27/60] linux-user: Remove REAL_HOST_PAGE_ALIGN from mmap.c, Richard Henderson, 2024/03/01
- [PATCH 35/60] linux-user: Move some mmap checks outside the lock, Richard Henderson, 2024/03/01
- [PATCH 37/60] linux-user: Split out mmap_end, Richard Henderson, 2024/03/01
- [PATCH 33/60] linux-user: Remove qemu_host_page_size from main, Richard Henderson, 2024/03/01
- [PATCH 34/60] linux-user: Split out target_mmap__locked, Richard Henderson, 2024/03/01
- [PATCH 21/60] linux-user: Remove qemu_host_page_size from create_elf_tables, Richard Henderson, 2024/03/01
- [PATCH 22/60] linux-user/hppa: Simplify init_guest_commpage, Richard Henderson, 2024/03/01
- [PATCH 24/60] linux-user/arm: Remove qemu_host_page_size from init_guest_commpage, Richard Henderson, 2024/03/01