From 27e45c744dbfc2a341e8142cb869fcf178a52b7c Mon Sep 17 00:00:00 2001 From: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com> Date: Mon, 9 Nov 2026 17:25:44 -0500 Subject: [PATCH] fix(native): the SysV segment lock is retried when a signal interrupts it --- tools/nativeguest/hook/sysv_shm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/nativeguest/hook/sysv_shm.c b/tools/nativeguest/hook/sysv_shm.c index 17154e4df..66089cf9b 100644 --- a/tools/nativeguest/hook/sysv_shm.c +++ b/tools/nativeguest/hook/sysv_shm.c @@ -139,7 +139,11 @@ static int shm_mark_attached(int id, int attached) { static int shm_lock_dir(int op) { int fd = shm_open_file(".lock", O_RDWR | O_CREAT, 0600); if (fd < 0) return -1; - if (syscall(SYS_flock, fd, op) != 0) { + long rc; + do { + rc = syscall(SYS_flock, fd, op); + } while (rc != 0 && errno == EINTR); + if (rc != 0) { syscall(SYS_close, fd); return -1; }