]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-event: fix sd_event_source_get_inotify_path()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 20 Apr 2024 04:20:46 +0000 (13:20 +0900)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sat, 20 Apr 2024 09:14:32 +0000 (11:14 +0200)
commit4a7cd0caad8d9f1f3ed7c4cfc6a66b4e94c28b4e
tree6373851e44595ca990b2d21cf041dd211b91ec1f
parentd762f4d52d31c8eb6a6a7e517f107dfe8d443ee8
sd-event: fix sd_event_source_get_inotify_path()

Follow-ups for 74c4231ce5f6cddabc2500391a8d5fd69e89b79e.

Previously, the path is obtained from the fd, but it is closed in
sd_event_loop() to unpin the filesystem.
So, let's save the path when the event source is created, and make
sd_event_source_get_inotify_path() simply read it.
man/sd_event_add_inotify.xml
src/libsystemd/sd-event/event-source.h
src/libsystemd/sd-event/sd-event.c
src/libsystemd/sd-event/test-event.c
src/systemd/sd-event.h