cd407a8cec
- 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
28 lines
865 B
Diff
28 lines
865 B
Diff
From 5ed074df62fe13acd491079c2156907ba9e5b3be Mon Sep 17 00:00:00 2001
|
|
From: Frederic Crozat <fcrozat@suse.com>
|
|
Date: Mon, 10 Jun 2013 18:29:57 +0200
|
|
Subject: [PATCH] terminal-session: don't close session fd if already closed
|
|
|
|
Prevents close(-1) from showing up in strace
|
|
---
|
|
src/libply/ply-terminal-session.c | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/libply/ply-terminal-session.c b/src/libply/ply-terminal-session.c
|
|
index e7377e9..0bdb985 100644
|
|
--- a/src/libply/ply-terminal-session.c
|
|
+++ b/src/libply/ply-terminal-session.c
|
|
@@ -148,7 +148,8 @@ ply_terminal_session_free (ply_terminal_session_t *session)
|
|
|
|
ply_free_string_array (session->argv);
|
|
|
|
- close (session->pseudoterminal_master_fd);
|
|
+ if (session->pseudoterminal_master_fd >= 0)
|
|
+ close (session->pseudoterminal_master_fd);
|
|
free (session);
|
|
}
|
|
|
|
--
|
|
1.8.1.4
|
|
|