From 53de7397c5d9cfcbf480f122a379f077345f8ba8 Mon Sep 17 00:00:00 2001 From: Pixel Date: Thu, 10 Jan 2002 14:15:35 +0000 Subject: Better duplicating handling... --- lib/OutPipe.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/OutPipe.cc') diff --git a/lib/OutPipe.cc b/lib/OutPipe.cc index 4b2e710..be93e15 100644 --- a/lib/OutPipe.cc +++ b/lib/OutPipe.cc @@ -11,6 +11,11 @@ OutPipe::~OutPipe() { } } +OutPipe::OutPipe(const OutPipe & o) : Handle(o), hooked(o.hooked) { + p[0] = dup(i.p[0]); + p[1] = GetHandle(); +} + void OutPipe::Hook() { if (!hooked) { hooked = 1; -- cgit v1.2.3