X-Original-To: alpine-devel@mail.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id 1F80ADC75E8 for ; Sat, 4 Jul 2015 09:23:10 +0000 (UTC) Received: from mailscanner02.zoner.fi (mailscanner02.zoner.fi [84.34.166.11]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id B2186DC01DF for ; Sat, 4 Jul 2015 09:23:09 +0000 (UTC) Date: Sat, 4 Jul 2015 12:21:54 +0300 From: Lasse Collin To: Michael Fox <415fox@gmail.com> Cc: busybox@busybox.net, alpine-devel , Natanael Copa Subject: [alpine-devel] Re: xzdiff in xz package is broken on alpine linux Message-ID: <20150704122154.1f62da73@tukaani.org> In-Reply-To: References: <20150630183840.543112f7@tukaani.org> <20150703213148.2060418c@tukaani.org> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-unknown-linux-gnu) X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Antivirus-Scanner: Clean mail though you should still use an Antivirus Received-SPF: none X-Virus-Scanned: ClamAV using ClamSMTP On 2015-07-03 Michael Fox wrote: > Do you think it's a bug in busybox? I think they follow this opengroup > standard > > http://pubs.opengroup.org/onlinepubs/009695399/utilities/diff.html > > It's hard to tell from the description of diff in that document > whether and how it should deal with two stdin pipes. There is just one stdin which often (but not always) is a pipe. Both POSIX.1-2001 (your link) and the latest version (POSIX.1-2008) http://pubs.opengroup.org/onlinepubs/9699919799/utilities/diff.html say that diff should work with pipes: Many early implementations of diff require seekable files. Since the System Interfaces volume of POSIX.1-2008 supports named pipes, the standard developers decided that such a restriction was unreasonable. Note also that the allowed filename - almost always refers to a pipe. > I was hoping this might work: > > diff <(echo foo) <(echo bar) > > But no. This part of the standard describes a subshell environment but > scrolling up it gives grammar: Seems that I confused you with the bash-specific syntax. Sorry about that. The syntax used with the shell has nothing to do with diff. Here is a test case using POSIX sh: sh$ mkfifo fifo sh$ echo foo > fifo & sh$ echo bar | diff fifo - 1c1 < foo --- > bar sh$ echo $? 1 Switching to BusyBox diff: sh$ mkfifo fifo sh$ echo foo > fifo & sh$ echo bar | busybox diff fifo - sh$ echo $? 0 Or: sh$ mkfifo fifo fifo2 sh$ echo foo > fifo & sh$ echo bar > fifo2 & sh$ busybox diff fifo fifo2 sh$ echo $? 0 diff from BusyBox 1.23.2 doesn't work if both arguments are pipes. -- Lasse Collin | IRC: Larhzu @ IRCnet & Freenode --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---