From 5f8034104a87c73dca597bd4eb381e74950ce053 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Tue, 29 Apr 2008 13:28:13 +0000 Subject: [PATCH] close stored fd --- src/zypper-misc.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/zypper-misc.cc b/src/zypper-misc.cc index dc97e2b..3594076 100644 --- a/src/zypper-misc.cc +++ b/src/zypper-misc.cc @@ -159,6 +159,8 @@ bool show_in_pager(const string& text) dup2(termout,1); execlp("sh","sh","-c",cmdline.str().c_str(),(char *)0); WAR << "exec failed with " << strerror(errno) << endl; + close(termin); + close(termout); exit(1); //cannot return false here, due to here is another process //so only kill itself @@ -167,6 +169,8 @@ bool show_in_pager(const string& text) //restore terminal access after end of pager dup2(termin,0); dup2(termout,1); + close(termin); + close(termout); } return true; -- 2.7.4