From dfa4d3638417bfb9fd3df371e804522884d679fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Fri, 17 Feb 2017 14:18:27 +0100 Subject: [PATCH] cleanup: remove dead code --- src/c/unixsys.d | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/src/c/unixsys.d b/src/c/unixsys.d index d2ae125f6..18367ba4c 100644 --- a/src/c/unixsys.d +++ b/src/c/unixsys.d @@ -642,29 +642,7 @@ create_descriptor(cl_object stream, cl_object direction, NULL, /* Current directory */ &st_info, /* Startup info */ &pr_info); /* Process info */ -#else /* 1 */ - saved_stdin = GetStdHandle(STD_INPUT_HANDLE); - saved_stdout = GetStdHandle(STD_OUTPUT_HANDLE); - saved_stderr = GetStdHandle(STD_ERROR_HANDLE); - SetStdHandle(STD_INPUT_HANDLE, child_stdin); - SetStdHandle(STD_OUTPUT_HANDLE, child_stdout); - SetStdHandle(STD_ERROR_HANDLE, child_stderr); - ZeroMemory(&st_info, sizeof(STARTUPINFO)); - st_info.cb = sizeof(STARTUPINFO); - ZeroMemory(&pr_info, sizeof(PROCESS_INFORMATION)); - ok = CreateProcess(NULL, command->base_string.self, - NULL, NULL, /* lpProcess/ThreadAttributes */ - TRUE, /* Inherit handles (for files) */ - /*CREATE_NEW_CONSOLE |*/ - 0, - NULL, /* Inherit environment */ - NULL, /* Current directory */ - &st_info, /* Startup info */ - &pr_info); /* Process info */ - SetStdHandle(STD_INPUT_HANDLE, saved_stdin); - SetStdHandle(STD_OUTPUT_HANDLE, saved_stdout); - SetStdHandle(STD_ERROR_HANDLE, saved_stderr); -#endif /* 1 */ + /* Child handles must be closed in the parent process */ /* otherwise the created pipes are never closed */ if (ok) {