From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-io0-f170.google.com ([209.85.223.170]) by ur; Wed Apr 27 03:06:19 EDT 2016 Received: by mail-io0-f170.google.com with SMTP id u185so44401049iod.3 for <9front@9front.org>; Wed, 27 Apr 2016 00:06:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=K2HJNKgV6AualV76w+xMYkAC89DOviApv0u/lgWqARo=; b=Eq2SxQNGT4TIOUEJwGBg8h+noWDY7/JZujYk17nreUYMXwMVzaD3fVdwFz6lxhgXnE VV0Qd7p+34lxuXSVIa1ZnQVTY1C2ihTl7uLfBf5FiKqC4lv10Qo/7QHSI/YKma8SFRt8 xq79+XdLh8X9si+PkyxKTQHSXr20LCz+YHboOZkvv9zzDvwgd/BF5wdilwp/7wZR8GWA f55BcurC4eajKBwElYO5/DVgqj2lAHkhRj4qHnUeyED3sEbTTx8ih1neXceLCHr6xbuv 5LIyYKUib1sDKdoP2EJPlq7U2azWzbb0EPnr/UEFUbjc0qOV9KIKUoktQNbzVQnjk61p 4UYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=K2HJNKgV6AualV76w+xMYkAC89DOviApv0u/lgWqARo=; b=ATJoroVz5eD1BryICePr0/FP1p3at28oomG/y/nWE4JtvqiHYeWhBQj3gHmAJHrHe9 zriQjvmcmWPXBWJmRmf2IcVg4g5DeIbUtwgZG8+KbXW9foXnFm21VLB1AMXXYvDjveTJ eupgLP62lCUs9CORbcyS3U2VWvMyYgU/IXcZ98eXKdlmMhmmEMELi93IPOKlIFcqS2gT l0Dj7jRsZPm7hQwQBbM5TVbiSNdL/aFEhayhaIn+Cef+PxTTdaCEXhHoLYDVHRVQ91zL 6APe41voZtejX9L3D0mEbgOhoJA6FcpZ7A105I0wMm8ORXGVvHbxpdtDIKmhH35cgLOW Q62w== X-Gm-Message-State: AOPr4FXZYvmsiR5dbu4T/tr0RSAXhTRCnPC2KbQtYhOKbX+QwZsaiqOOYDxYyoH8k1jltUJ4clBgiF9b9OBgsQ== MIME-Version: 1.0 X-Received: by 10.107.41.210 with SMTP id p201mr9365092iop.106.1461740777869; Wed, 27 Apr 2016 00:06:17 -0700 (PDT) Received: by 10.79.37.14 with HTTP; Wed, 27 Apr 2016 00:06:17 -0700 (PDT) In-Reply-To: References: Date: Wed, 27 Apr 2016 09:06:17 +0200 Message-ID: Subject: Re: [9front] Compound commands and pipes in rc From: Rudolf Sykora To: 9front@9front.org Content-Type: text/plain; charset=UTF-8 List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: proven persistence realtime table Hello, On 20 April 2016 at 15:15, Alex Musolino wrote: > Hi all, > > I have come across some suspect behaviour in rc. I have trawled the > man page but it doesn't seem to have much to say on the matter. > > Consider the following rc script: > > bind '#|' /n/gopher >>[3=1] { > echo > cat [1=3] > } | aux/trampoline tcp!gopherproject.org!70 >/n/gopher/data1 > > This produces no output, whilst the following script does: > > bind '#|' /n/gopher >>[3=1] { > echo > cat [1=3] > echo >/dev/null > } | aux/trampoline tcp!gopherproject.org!70 >/n/gopher/data1 > > It would seem that in the first example the unnamed pipe is closed > after echo exits and therefore before aux/trampoline can read anything > from the remote end much less write anything to the named pipe. > > Can someone confirm whether or not this is the case and, if so, > whether or not it is expected behaviour? I don't really understand your question, but would recommend you to ask in the plan9 mailing list; people there might know better. Ruda