On 10/13/26 11:02, Daniel P. Berrangé wrote:
On Tue, Oct 13, 2026 at 12:01:58AM +0200, Filip Hejsek wrote:
Use qemu_dup() to ensure the cloexec flag is set on dup'd fds.

The following dup() instances were left unchanged:

     FILE                     REASON
     util/osdep.c             implementation of qemu_dup
     migration/cpr-exec.c     fd is intentionally kept across exec

IMHO that should use qemu_dup() too, and then explicitly
clear the O_CLOEXEC flag so intended behaviour is clear.
Right now it looks like a mistaken failure to use qemu_dup.

     tests/*                  left for future work

Why not fix them now ? There are only a few uses which look suitable
to change.

I'd say let's apply this one and fix the rest later.

I don't see a big need to do that in tests/ - if not only for
consistency.

Thanks,

/mjt

Reply via email to