summaryrefslogtreecommitdiff
path: root/src/udev/udevd.c
diff options
context:
space:
mode:
author0xAX <0xAX@users.noreply.github.com>2016-10-10 05:55:24 +0300
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-10-09 22:55:24 -0400
commit9fc932bff1e2058885fc458412b3c94d586cb586 (patch)
treeab8453098c14c96f7f4d77b20899eb7ca9080770 /src/udev/udevd.c
parent763368943a7154e003f4cf949084564bdc4206ca (diff)
tree-wide: print warning in a failure case of make_null_stdio() (#4320)
The make_null_stdio() may fail. Let's check its result and print warning message instead of keeping silence.
Diffstat (limited to 'src/udev/udevd.c')
-rw-r--r--src/udev/udevd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index 19f1c29198..6000d9c7ec 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -1739,7 +1739,9 @@ int main(int argc, char *argv[]) {
/* connect /dev/null to stdin, stdout, stderr */
if (log_get_max_level() < LOG_DEBUG)
- (void) make_null_stdio();
+ if (make_null_stdio() < 0)
+ log_warning_errno(errno, "Failed to redirect standard streams to /dev/null: %m");
+
pid = fork();
switch (pid) {