From 7c1caacc353d015669de104ab1683e527afb0c5e Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Sun, 19 May 2013 10:15:14 -0700 Subject: [PATCH] io.launcher: Fix two potential bugs. 1) If first (pipe) succeeds but second one fails, first pipe leaks. 2) out>> dispose fails, then in>> dispose is never called and leaks. --- basis/io/launcher/launcher.factor | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/basis/io/launcher/launcher.factor b/basis/io/launcher/launcher.factor index 79fb29b770..02a814284d 100755 --- a/basis/io/launcher/launcher.factor +++ b/basis/io/launcher/launcher.factor @@ -233,15 +233,15 @@ PRIVATE> : ( desc encoding -- stream process ) [ [ - (pipe) (pipe) { - [ [ |dispose drop ] bi@ ] + (pipe) |dispose + (pipe) |dispose { [ rot >process [ swap in>> or ] change-stdin [ swap out>> or ] change-stdout run-detached ] - [ [ out>> dispose ] [ in>> dispose ] bi* ] + [ [ out>> &dispose drop ] [ in>> &dispose drop ] bi* ] [ [ in>> ] [ out>> ] bi* ] } 2cleave ] dip swap