]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-event: make pidfd copy in event_add_child_pidref()
authorLennart Poettering <lennart@poettering.net>
Wed, 19 Mar 2025 14:11:58 +0000 (15:11 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 19 Mar 2025 17:14:24 +0000 (18:14 +0100)
commit179dcf924f7d0ac9398f54baeb39b47abd23aeaf
tree3daa34fa3a850e060b1b44b7d60ad3f0e73076d6
parent511bf79b4e424de3cbed0f5814d9fa9126ff0103
sd-event: make pidfd copy in event_add_child_pidref()

So far we'd directly use the pidfd passed into event_add_child_pidref(),
hoping it would not be closed by the caller before we are done. This was
violated by vmspawn however.

Let's make this safe, and simply duplicate the fd, and make us
independent of the caller.
src/libsystemd/sd-event/event-util.c
src/vmspawn/vmspawn.c