projects
/
platform
/
upstream
/
zypper.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a7f0272
)
close stored fd
author
Josef Reidinger
<jreidinger@suse.cz>
Tue, 29 Apr 2008 13:28:13 +0000
(13:28 +0000)
committer
Josef Reidinger
<jreidinger@suse.cz>
Tue, 29 Apr 2008 13:28:13 +0000
(13:28 +0000)
src/zypper-misc.cc
patch
|
blob
|
history
diff --git
a/src/zypper-misc.cc
b/src/zypper-misc.cc
index
dc97e2b
..
3594076
100644
(file)
--- 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;