]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: ignore OOM error in on_spawn_io()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 1 Feb 2021 15:54:40 +0000 (00:54 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 1 Feb 2021 16:10:59 +0000 (01:10 +0900)
src/udev/udev-event.c

index 009a48020e3e406057adb8e621c6d565e4882595..f55e65c95b74c9b920563feaca04a4c4e8d5e479 100644 (file)
@@ -575,19 +575,19 @@ static int on_spawn_io(sd_event_source *s, int fd, uint32_t revents, void *userd
 
                 v = strv_split_newlines(p);
                 if (!v)
-                        return 0;
+                        log_oom_debug();
 
                 STRV_FOREACH(q, v)
                         log_device_debug(spawn->device, "'%s'(%s) '%s'", spawn->cmd,
                                          fd == spawn->fd_stdout ? "out" : "err", *q);
         }
 
-
         if (l == 0)
                 return 0;
 
-        /* Re-enable the event source if we did not encounter EOF */
 reenable:
+        /* Re-enable the event source if we did not encounter EOF */
+
         r = sd_event_source_set_enabled(s, SD_EVENT_ONESHOT);
         if (r < 0)
                 log_device_error_errno(spawn->device, r,