Marcus Meissner
f45a4f9a5e
forward-port several patches from sle11sp3.bnc#831518 OBS-URL: https://build.opensuse.org/request/show/227422 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=85
29 lines
818 B
Diff
29 lines
818 B
Diff
From 7b1315411f1de73801fd38f264ca507ae3807e53 Mon Sep 17 00:00:00 2001
|
|
From: Zdenek Kabelac <zkabelac@redhat.com>
|
|
Date: Tue, 6 Aug 2013 16:07:50 +0200
|
|
Subject: [PATCH] clmvd: fix decriptor leak on restart
|
|
|
|
Do not leave descriptor used for dup2() openned.
|
|
---
|
|
daemons/clvmd/clvmd.c | 4 ++++
|
|
2 files changed, 5 insertions(+)
|
|
|
|
diff --git a/daemons/clvmd/clvmd.c b/daemons/clvmd/clvmd.c
|
|
index f05776f..eaa75ca 100644
|
|
--- a/daemons/clvmd/clvmd.c
|
|
+++ b/daemons/clvmd/clvmd.c
|
|
@@ -1085,6 +1085,10 @@ static void be_daemon(int timeout)
|
|
log_error("Error setting terminal FDs to /dev/null: %m");
|
|
exit(5);
|
|
}
|
|
+ if ((devnull > STDERR_FILENO) && close(devnull)) {
|
|
+ log_sys_error("close", "/dev/null");
|
|
+ exit(7);
|
|
+ }
|
|
if (chdir("/")) {
|
|
log_error("Error setting current directory to /: %m");
|
|
exit(6);
|
|
--
|
|
1.8.4.5
|
|
|