From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 42898 invoked by alias); 4 Oct 2017 14:42:00 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 42869 invoked by uid 89); 4 Oct 2017 14:41:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=channels, Kaz, kaz, Kylheku X-HELO: mail-io0-f176.google.com Received: from mail-io0-f176.google.com (HELO mail-io0-f176.google.com) (209.85.223.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 04 Oct 2017 14:41:58 +0000 Received: by mail-io0-f176.google.com with SMTP id l15so10729021iol.8 for ; Wed, 04 Oct 2017 07:41:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:reply-to:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=2BjSX8BpKqWqzVTwUAm9k9OmzDWhRrezVimIpmMe6zQ=; b=ogkpYq2HBlbKzVc4MI2LASFpozLFGi7c0cQlj+HQvL8sbL+QWjsBCZHV5p7Wyl6iCo CrS3+msRvhI/0zXwPXCyYPaibmOZvILmFqPgJrNfOi+BYLELUH8NB31bdRTsBvsatjFB kZkx6JEPPkXdqR6eT+DvuU9UN9HaGNPQaqRjORg6kY9Zd/9QL5yOuqX2asNdwuQ0ZeWf OW5Rc2ePPyms/HKiwIjnUk8BRhTiCS9p92FSxWD4c6QFSTNGAWte5+f3V7DR3sA/fA8E ACCrJ08qqlVJitJ0d8+4z2fZRN3TRXX/CanTLU80iKuPjM3D1P54iGpFR7/mdSxPdj5N 55mQ== X-Gm-Message-State: AMCzsaXhuuu5P6O1hGIm7hpk3pUDhzKUZEPYdh9py01fx18IBBuPFxmM Nf20H1SZEq+ghuOHFNm2lQWfYQ== X-Google-Smtp-Source: AOwi7QB82AoxvOp6zUJypL14XIgpAmcsWUknt3HNU3ZJtvLYs8b3z73oGawua4qaLc3fFUetwL1keQ== X-Received: by 10.107.59.17 with SMTP id i17mr32359840ioa.136.1507128116581; Wed, 04 Oct 2017 07:41:56 -0700 (PDT) Received: from [192.168.0.6] (d4-50-42-50.try.wideopenwest.com. [50.4.50.42]) by smtp.gmail.com with ESMTPSA id g9sm7402315itg.41.2017.10.04.07.41.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Oct 2017 07:41:55 -0700 (PDT) Subject: Re: bash pipe race condition To: cygwin@cygwin.com References: <33e9d184-03b1-5fa5-4c1a-0cca19571a3a@gmail.com> <3b4549f8494b5b4062e90eecc1dfc356@mail.kylheku.com> Reply-To: cygwin@cygwin.com From: cyg Simple Message-ID: <8913ebd6-2d4d-a438-911f-589c8ac05bef@gmail.com> Date: Wed, 04 Oct 2017 14:42:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <3b4549f8494b5b4062e90eecc1dfc356@mail.kylheku.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2017-10/txt/msg00040.txt.bz2 On 10/3/2017 11:39 PM, Kaz Kylheku wrote: > On 03.10.2017 05:56, cyg Simple wrote: >> On 10/2/2017 9:06 PM, Matthew McGIllis wrote: >>> If I use the same code from bash I get: >>> >>> $ ./input.exe | ./simple.exe >>> line1 >>> <—— Hangs indefinitely until you kill it or ctrl-c >>> >>> Some how if input has a delay between its line output then things >>> will get hung, if you remove the sleep from the input things work, >>> add the sleep in it fails. >>> >>> >>> input.exe is generate from input.vb using: vbc input.vb > [ ... ] >> >> It is a known issue of the PTY emulation between a Cygwin runtime and a >> Windows runtime enabled app.  It just cannot be fixed.  You're even >> lucky that it works in the Windows command shell. > > Lucky? Are VB console apps known to have unreliable piping when > used from the Windows command processor? > >> Either convert >> simple.vb to simple.c and use Cygwin's gcc to build it or create a >> Windows runtime version of input.exe. > > Isn't that what "input.exe is generate[d] from input.vb using: vbc > input.vb" > is referring to? Oh, yes, sorry I missed that. Still an issue with PTY and cannot be fixed regardless without creating a C program of both. Straight console on the stdin and stdout channels might work with the C runtime with MS runtime but should be Cygwin runtime when using Cygwin. -- cyg Simple -- 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