]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
import,sysupdate: make notify event processed before SIGCHLD of worker processes
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 13 Aug 2025 05:35:51 +0000 (14:35 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 13 Aug 2025 14:44:58 +0000 (23:44 +0900)
This fixes the following warning:
```
[    5.628796] TEST-13-NSPAWN.sh[299]: + importctl import-raw --class=confext /var/tmp/importtest
(snip)
[    5.638894] systemd-importd[302]: (transfer1) Operation completed successfully.
[    5.640760] TEST-13-NSPAWN.sh[318]: ^MTotal:   0%^MTotal:  40%
[    5.638902] systemd-importd[302]: (transfer1) Exiting.
[    5.638931] systemd-importd[302]: Got percentage from client: 40%
[    5.638956] systemd-importd[302]: Transfer process succeeded.
[    5.638988] systemd-importd[302]: Got notification datagram from unexpected peer, ignoring.
```

src/import/importd.c
src/sysupdate/sysupdated.c

index 84cc9ca86ab2dfb763b1aea6af39328f26e428ec..f2715691abbbb5dcdac40328f0aca5388cd24fee 100644 (file)
@@ -721,7 +721,7 @@ static int manager_new(Manager **ret) {
 
         r = notify_socket_prepare(
                         m->event,
-                        SD_EVENT_PRIORITY_NORMAL,
+                        SD_EVENT_PRIORITY_NORMAL - 1, /* Make this processed before SIGCHLD. */
                         manager_on_notify,
                         m,
                         &m->notify_socket_path);
index cc45ca0657f7990a8920f17cc38f404e49990372..b1438ff825aa5aaa3adceef21a5f8ba2966a1256 100644 (file)
@@ -1746,7 +1746,7 @@ static int manager_new(Manager **ret) {
 
         r = notify_socket_prepare(
                         m->event,
-                        SD_EVENT_PRIORITY_NORMAL,
+                        SD_EVENT_PRIORITY_NORMAL - 1, /* Make this processed before SIGCHLD. */
                         manager_on_notify,
                         m,
                         &m->notify_socket_path);