plymouth/plymouth-close.patch
Raymond Wooninck cd407a8cec Accepting request 178568 from home:fcrozat:branches:Base:System
- Add plymouth-close: do not try to close negative fd.
- Add plymouth-close-unredirect.patch: do not leak fd when stopping
  redirection of /dev/console (bnc#811185)
- Add plymouth-redirect-null.patch: redirect plymouth standard io
  to /dev/null (bnc#811185)
- Add plymouth-exit-code.patch: ignore exit code in ExecStartPost.
- Add plymouth-terminal-session-close.patch: do no try to close
  terminal session fd if already closed.

OBS-URL: https://build.opensuse.org/request/show/178568
OBS-URL: https://build.opensuse.org/package/show/Base:System/plymouth?expand=0&rev=107
2013-06-11 20:12:23 +00:00

28 lines
724 B
Diff

From 5784c8ff0c425b0948b653541c58fb8493515aa7 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Thu, 6 Jun 2013 10:08:55 -0400
Subject: [PATCH] logger: don't close already logger if already closed
This prevents close(-1) from showing up in strace
---
src/libply/ply-logger.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/libply/ply-logger.c b/src/libply/ply-logger.c
index 5ea0b5e..ec5b6e5 100644
--- a/src/libply/ply-logger.c
+++ b/src/libply/ply-logger.c
@@ -357,6 +357,9 @@ ply_logger_close_file (ply_logger_t *logger)
{
assert (logger != NULL);
+ if (logger->output_fd < 0)
+ return;
+
close (logger->output_fd);
ply_logger_set_output_fd (logger, -1);
}
--
1.8.1.4