delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/02/02/02:02:25

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:cc:subject:message-id:in-reply-to
:references:mime-version:content-type; q=dns; s=default; b=qqdYp
7Cn2eMMQJ2jG3z6Ee6BMUlpQHMoJYK/0qIypXB8C/ZxS/bMUo2OI5MJ5xUYWByJf
3jIaNogpyYbhopMFwfhaybA7EcVLgG+08oPJxS9aIt2dGdM4b3cYBo8b93e5VkTK
jTBzEE+kF3l4QVJE3yY+Z+QV5lz+bkxnIRg5NA=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:cc:subject:message-id:in-reply-to
:references:mime-version:content-type; s=default; bh=gjcVmSFBcis
Uu3Wimom5ad8Uopw=; b=cEgXJivs79CWtTO1aRTgOe/soT/CuA6060lKMmw8khb
vvv4BKFPIS0UFBJNvohF/OA8TzRIiDikAgN+LOndUjHFqn3uyVMa+DfZhdx3ylzp
iU8ljHjMAgA773eVcbeanws3XobkfwI1erKXzuiCuF3ioLZTtkMNdi0ZWGtImB+c
=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-5.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=H*MI:sk:1489040, H*i:sk:1489040, sk:221bdff, sk:ENABLE_
X-HELO: conssluserg-04.nifty.com
DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com 01271CEY009759
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1580626872; bh=XsFn0p3PiHRI5sGAtcgMAsdJrqxK8fat42h+OQhTXkY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=QL30cqNhNp4Q64rqZemR6S3Wu4GL1SvgN0LABmfBzXqPL1QdU8P4RV+pZme1uXntx hamNSeWiaP7bo2PrSMWDXdwo74T4Js1VQBZZoVvms+IQCmIJiM2rz87jzTpNXHcyrI gDXYyTNijKQ7y4CNMzQi7z9hwlXyarQ7ZXebXzUfI3doNjTCmRNYi8OdVnc7yw4V8N MbY0xOqGSf7xyWOFZ6lpQFkcQW3rt8C11TdGWD1EjYAK+v/rlpneUMQzil4AgcrXxs Pnd3niP+snWxrT4MqGWHc+fmC6g38tIuuEfmA3mZ7UrbnbUyNyzmY+9wzNWLhEXt07 rK8XZGCVBy5eg==
Date: Sun, 2 Feb 2020 16:01:23 +0900
From: Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>
To: cygwin AT cygwin DOT com
Cc: Anon User <retry0001-vps AT yahoo DOT com>
Subject: Re: Mintty/tmux hangs for 1 minute on startup - seems to be a forking issue
Message-Id: <20200202160123.675a70d06491b3ba2bb84969@nifty.ne.jp>
In-Reply-To: <1489040583.393819.1580599508135@mail.yahoo.com>
References: <595178088 DOT 221931 DOT 1580542748412 DOT ref AT mail DOT yahoo DOT com> <595178088 DOT 221931 DOT 1580542748412 AT mail DOT yahoo DOT com> <847088463 DOT 368454 DOT 1580578852885 AT mail DOT yahoo DOT com> <20200202081056 DOT 6a8dee7af7861a7969329f47 AT nifty DOT ne DOT jp> <1489040583 DOT 393819 DOT 1580599508135 AT mail DOT yahoo DOT com>
Mime-Version: 1.0
X-IsSubscribed: yes

--Multipart=_Sun__2_Feb_2020_16_01_23_+0900_M9XG/cX0agUEJXKx
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

On Sat, 1 Feb 2020 23:25:08 +0000 (UTC)
"Anon User via cygwin" wrote:
> $ md5sum /bin/cygwin-console-helper.exe
> 221bdfff7c8ccd1227bacb025bba665b */bin/cygwin-console-helper.exe

This is the right md5sum value.
Then, how about the attached test case?

-- 
Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>

--Multipart=_Sun__2_Feb_2020_16_01_23_+0900_M9XG/cX0agUEJXKx
Content-Type: text/x-csrc;
 name="pcon_test_1min.c"
Content-Disposition: attachment;
 filename="pcon_test_1min.c"
Content-Transfer-Encoding: 7bit

#define _WIN32_WINNT 0x0a00
#include <windows.h>
#include <stdio.h>

typedef void *HPCON;
#ifndef PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE
#define PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE 0x00020016L
#endif
#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING
#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004
#endif

DWORD WINAPI PipeWriter(LPVOID pipe);
DWORD WINAPI PipeReader(LPVOID pipe);

int main()
{
	HMODULE h;
	FARPROC f;
	COORD size;
	HPCON hpCon;
	HANDLE inR, inW, outR, outW;
	HRESULT (WINAPI *CreatePseudoConsole)(COORD, HANDLE, HANDLE, DWORD, HPCON*);
	VOID (WINAPI *ClosePseudoConsole)(HPCON);

	h = GetModuleHandle("kernel32.dll");
	if (h == INVALID_HANDLE_VALUE) {
		fprintf(stderr, "GetModuleHandle() failed.\n");
		return 1;
	}
	f = GetProcAddress(h, "CreatePseudoConsole");
	if (f == NULL) {
		fprintf(stderr, "GetProcAddress() failed.\n");
		return 1;
	}
	CreatePseudoConsole = (HRESULT (WINAPI *)(COORD, HANDLE, HANDLE, DWORD, HPCON*))f;
	f = GetProcAddress(h, "ClosePseudoConsole");
	if (f == NULL) {
		fprintf(stderr, "GetProcAddress() failed.\n");
		return 1;
	}
	ClosePseudoConsole = (VOID (WINAPI *)(HPCON))f;
	CloseHandle(h);

	if (!CreatePipe(&inR, &inW, NULL, 0)) {
		fprintf(stderr, "CreatePipe() failed.\n");
		return 1;
	}
	if (!CreatePipe(&outR, &outW, NULL, 0)) {
		fprintf(stderr, "CreatePipe() failed.\n");
		return 1;
	}

	size.X = 80;
	size.Y = 24;

	printf("Started.\n");
	if (S_OK != CreatePseudoConsole(size, inR, outW, 0, &hpCon)) {
		fprintf(stderr, "CreatePseudoConsole() failed.\n");
		return 1;
	}
	printf("CreatePseudoConsole() end.\n");

	CloseHandle(inR);
	CloseHandle(outW);
	ClosePseudoConsole(hpCon);
	CloseHandle(inW);
	CloseHandle(outR);
	printf("ClosePseudoConsole() end.\n");

	return 0;
}


--Multipart=_Sun__2_Feb_2020_16_01_23_+0900_M9XG/cX0agUEJXKx
Content-Type: text/plain; charset=us-ascii


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
--Multipart=_Sun__2_Feb_2020_16_01_23_+0900_M9XG/cX0agUEJXKx--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019