Re: grep < fifo fails

2018-10-10 Thread Corinna Vinschen
On Oct 8 10:03, Eric Blake wrote: > On 10/8/18 3:24 AM, Houder wrote: > > grep fails on Cygwin because lseek() on Cygwin fails to recognize > > that it is applied to a FIFO. As result of that, it returns EINVAL > > in errno, where it should return ESPIPE. > > > > Receiving the wrong value in errn

Re: grep < fifo fails

2018-10-10 Thread Houder
On Mon, 08 Oct 2018 10:24:01, Houder wrote: ... > > > > On Wed, 3 Oct 2018 15:37:14, Ole Tange wrote: > > > > > This works: > > > > > > > > > > $ mkfifo fifo > > > > > $ echo > fifo & grep . fifo > > > > > [1] 10232 > > > > > [1]+ Doneecho > fifo > > > > > > > > > > But thi

Re: grep < fifo fails

2018-10-08 Thread Eric Blake
On 10/8/18 3:24 AM, Houder wrote: grep fails on Cygwin because lseek() on Cygwin fails to recognize that it is applied to a FIFO. As result of that, it returns EINVAL in errno, where it should return ESPIPE. Receiving the wrong value in errno forces reset() (in src/grep.c) to return false, upon

Re: grep < fifo fails

2018-10-08 Thread Houder
On Fri, 05 Oct 2018 17:32:16, Houder wrote: > On Thu, 04 Oct 2018 18:02:03, Houder wrote: > > On Wed, 03 Oct 2018 20:46:11, Houder wrote: > > > On Wed, 3 Oct 2018 15:37:14, Ole Tange wrote: > > > > This works: > > > > > > > > $ mkfifo fifo > > > > $ echo > fifo & grep . fifo > > > > [1] 10232 > >

Re: grep < fifo fails

2018-10-05 Thread Houder
On Thu, 04 Oct 2018 18:02:03, Houder wrote: > On Wed, 03 Oct 2018 20:46:11, Houder wrote: > > On Wed, 3 Oct 2018 15:37:14, Ole Tange wrote: > > > This works: > > > > > > $ mkfifo fifo > > > $ echo > fifo & grep . fifo > > > [1] 10232 > > > [1]+ Doneecho > fifo > > > > > > Bu

Re: grep < fifo fails

2018-10-04 Thread Houder
On Wed, 03 Oct 2018 20:46:11, Houder wrote: > On Wed, 3 Oct 2018 15:37:14, Ole Tange wrote: > > This works: > > > > $ mkfifo fifo > > $ echo > fifo & grep . fifo > > [1] 10232 > > [1]+ Doneecho > fifo > > > > But this fails: > > > > $ echo > fifo & grep . < fifo > > [1] 117

Re: grep < fifo fails

2018-10-03 Thread Houder
On Wed, 3 Oct 2018 15:37:14, Ole Tange wrote: > This works: > > $ mkfifo fifo > $ echo > fifo & grep . fifo > [1] 10232 > [1]+ Doneecho > fifo > > But this fails: > > $ echo > fifo & grep . < fifo > [1] 11756 > grep: (standard input): Invalid argument > [1]+ Done

Re: grep < fifo fails

2018-10-03 Thread Marco Atzeri
Am 03.10.2018 um 17:37 schrieb Ole Tange: This works: $ mkfifo fifo $ echo > fifo & grep . fifo [1] 10232 [1]+ Doneecho > fifo But this fails: $ echo > fifo & grep . < fifo [1] 11756 grep: (standard input): Invalid argument [1]+ Doneecho > fifo I see

grep < fifo fails

2018-10-03 Thread Ole Tange
This works: $ mkfifo fifo $ echo > fifo & grep . fifo [1] 10232 [1]+ Doneecho > fifo But this fails: $ echo > fifo & grep . < fifo [1] 11756 grep: (standard input): Invalid argument [1]+ Doneecho > fifo I see the same behavior on MINGW, but I do not se