From bae79b80e32cc2658dbd7c0f804f5c9ae0f2ec95 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sun, 3 Feb 2008 15:14:48 -0600 Subject: [PATCH] Undo handle duplication --- extra/io/windows/launcher/launcher.factor | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/extra/io/windows/launcher/launcher.factor b/extra/io/windows/launcher/launcher.factor index 3d0c2feac1..f3f78fbb88 100755 --- a/extra/io/windows/launcher/launcher.factor +++ b/extra/io/windows/launcher/launcher.factor @@ -118,23 +118,11 @@ TUPLE: CreateProcess-args : inherited-stderr ( args -- handle ) drop STD_ERROR_HANDLE GetStdHandle ; -: duplicate-handle ( handle -- handle ) - GetCurrentProcess - swap - GetCurrentProcess - f [ - 0 - TRUE - DUPLICATE_SAME_ACCESS - DuplicateHandle win32-error=0/f - ] keep *void* ; - : redirect-stderr ( args -- handle ) +stderr+ get dup +stdout+ eq? [ drop - CreateProcess-args-lpStartupInfo duplicate-handle - STARTUPINFO-hStdOutput + CreateProcess-args-lpStartupInfo STARTUPINFO-hStdOutput ] [ GENERIC_WRITE CREATE_ALWAYS redirect swap inherited-stderr ?closed