anchor.diff:    finally
       LastError := GetLastError;
       try
  -      if hWriteHandle <>0  then begin
  -        CloseHandle(hReadHandle);
  -        CloseHandle(hWriteHandle);
  +      if WriteHandle <>0  then begin
  +        CloseHandle(ReadHandle);
  +        CloseHandle(WriteHandle);
         end;
         if OutPipeInfo.PipeRead <> 0 then
           CloseHandle(OutPipeInfo.PipeRead);
  
positive.code:   Flags: DWORD;
    // for stdin
    StdInSA:TSecurityAttributes;
    hReadHandle, hWriteHandle: THandle;
  begin
    Result := False;
  
  
negative.code:     StartupInfo.dwFlags := StartupInfo.dwFlags or STARTF_USESHOWWINDOW;
      StartupInfo.wShowWindow := StartupVisibilityFlags[Options.StartupVisibility];
    end;
    WriteHandle := 0;  // initialize so that we know whether it was created
    ReadHandle := GetStdHandle(STD_INPUT_HANDLE);
    if (ReadHandle=INVALID_HANDLE_VALUE) or (ReadHandle=0) then
    begin
      StdInSA.lpSecurityDescriptor := nil;
      StdInSA.nLength := sizeof(SECURITY_ATTRIBUTES);
      StdInSA.bInheritHandle := true;
      CreatePipe(ReadHandle, WriteHandle, @StdInSA,0);
    end;
    StartupInfo.hStdInput :=  ReadHandle;
    StartupInfo.hStdOutput := OutPipeInfo.PipeWrite;
    if Options.MergeError then
      StartupInfo.hStdError := OutPipeInfo.PipeWrite
  