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:subject:to:references:reply-to:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=sGux+YVfLCZ0eoam gYnXqUEtgfWmjC8KD5uxMbmrdFpyOqmd7CvqMfbLcm4hU6Koi24sqCy064H4AduK O7j1L/Zgt0bCm/n0WghM70f6JoSd7rDzL99JvijBBeInQKJFJHYrAk4zzbJwtI7C toQpvE6wITwlZwyx1DVlCToVBYA= 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:subject:to:references:reply-to:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=gZE97MwYdCY2Hem26+sTMA /dlUM=; b=cIO5Qiu1U0GO/zz2ALgk9FqoreNBv/QluBA5erJD8zphHVw/vWU3sM VY5QkhmbDXxMgXHBuPFIDXzXDP6ACLmWeWYKx5EJ/yxlcSeVkLp0PjoiXXhmB5oE YMiEGVD0g+OASR9WI8dxfn0oLZa29FpEP2JDvmLJke3JaFgnenhvQ= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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-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 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) Subject: Re: bash pipe race condition To: cygwin AT cygwin DOT com References: <33e9d184-03b1-5fa5-4c1a-0cca19571a3a AT gmail DOT com> <3b4549f8494b5b4062e90eecc1dfc356 AT mail DOT kylheku DOT com> Reply-To: cygwin AT cygwin DOT com From: cyg Simple Message-ID: <8913ebd6-2d4d-a438-911f-589c8ac05bef@gmail.com> Date: Wed, 4 Oct 2017 10:41:57 -0400 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 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