summaryrefslogtreecommitdiff
path: root/lib/InPipe.cc
diff options
context:
space:
mode:
authorPixel <Pixel>2002-01-10 14:15:35 +0000
committerPixel <Pixel>2002-01-10 14:15:35 +0000
commit53de7397c5d9cfcbf480f122a379f077345f8ba8 (patch)
treef8061c3fe184c635d2fa419ed039e0611a11063f /lib/InPipe.cc
parent692672cd414addadfe666904c10d4492a7fcbe17 (diff)
Better duplicating handling...
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);