summaryrefslogtreecommitdiff
path: root/lib/InPipe.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/InPipe.cc')
-rw-r--r--lib/InPipe.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/InPipe.cc b/lib/InPipe.cc
index 978d24b..c61005f 100644
--- a/lib/InPipe.cc
+++ b/lib/InPipe.cc
@@ -4,6 +4,11 @@
InPipe::InPipe() : Handle(pipe(p, 0)), hooked(0) { }
+InPipe::InPipe(const InPipe & i) : Handle(i), hooked(i.hooked) {
+ p[0] = GetHandle();
+ p[1] = dup(i.p[1]);
+}
+
InPipe::~InPipe() {
if (hooked) {
::close(1);