Re: Bug#545422: coreutils: "tail -f -" fails

2009-09-22 Thread Paul Eggert
Giuseppe Scrivano writes: > In my opinion, it is desiderable that tail works approximately in the > same way when stdin is specified, Assuming that the extension you proposed in is added to the Linux kernel, I suggest that coreuti

Re: Bug#545422: coreutils: "tail -f -" fails

2009-09-22 Thread Giuseppe Scrivano
Jim Meyering writes: > Considering the amount of complexity it adds to already-dense code > (in spite of the fact that some is just due to indentation changes), > for so little gain (who will use tail -f on stdin and care whether tail > is sleep-based or inotify-based?), I'm reluctant to use it a

Re: Bug#545422: coreutils: "tail -f -" fails

2009-09-22 Thread Jim Meyering
Giuseppe Scrivano wrote: > have you considered this patch for inclusion? I don't see a clearer way > to avoid polling without inotify fd support. >> This patch changes `tail' to handle stdin separately from inotify >> events, similar to what we are already doing when a --pid is specified. Hi Giu

Re: Bug#545422: coreutils: "tail -f -" fails

2009-09-22 Thread Giuseppe Scrivano
Hi Jim, have you considered this patch for inclusion? I don't see a clearer way to avoid polling without inotify fd support. Regards, Giuseppe Giuseppe Scrivano writes: > This patch changes `tail' to handle stdin separately from inotify > events, similar to what we are already doing when a -

Re: Bug#545422: coreutils: "tail -f -" fails

2009-09-09 Thread Michael Stone
On Mon, Sep 07, 2009 at 05:15:58PM +0200, Jim Meyering wrote: Giuseppe Scrivano wrote: This patch changes `tail' to handle stdin separately from inotify events, similar to what we are already doing when a --pid is specified. This sounds good in principle, but it's too invasive for 7.6. I'll lo

Re: Bug#545422: coreutils: "tail -f -" fails

2009-09-07 Thread Jim Meyering
Giuseppe Scrivano wrote: > Jim Meyering writes: > >> I considered that and discussed the >> trade-off in the comment I committed. >> There have been systems and configurations with >> nonexistent and unusable /dev/stdin files. > > sorry, I didn't read you comment. > > This patch changes `tail' to

Re: Bug#545422: coreutils: "tail -f -" fails

2009-09-07 Thread Giuseppe Scrivano
Jim Meyering writes: > I considered that and discussed the > trade-off in the comment I committed. > There have been systems and configurations with > nonexistent and unusable /dev/stdin files. sorry, I didn't read you comment. This patch changes `tail' to handle stdin separately from inotify e

Re: Bug#545422: coreutils: "tail -f -" fails

2009-09-07 Thread Jim Meyering
Giuseppe Scrivano wrote: > what do you think about the following solution? It avoids to revert to > the "old" polling mechanism using "/dev/stdin" instead of "-" to > inotify_add_watch. I considered that and discussed the trade-off in the comment I committed. There have been systems and configura

Re: Bug#545422: coreutils: "tail -f -" fails

2009-09-07 Thread Giuseppe Scrivano
Hi Jim, what do you think about the following solution? It avoids to revert to the "old" polling mechanism using "/dev/stdin" instead of "-" to inotify_add_watch. Cheers, Giuseppe diff --git a/src/tail.c b/src/tail.c index e3b9529..016b712 100644 --- a/src/tail.c +++ b/src/tail.c @@ -1152,6 +1

Re: Bug#545422: coreutils: "tail -f -" fails

2009-09-06 Thread Jim Meyering
Bill Brelsford wrote: > Package: coreutils > Version: 7.5-3 > Severity: normal > > "tail -f" no longer works with stdin. E.g. commands such as > > somecommand | tail -f - > somecommand | tail -f > tail -f > fail with the message: > > tail: cannot watch `-': No such file or