bug-textutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: Bug#80541: [Patch] GNU tail does now support option


From: Jim Meyering
Subject: Re: address@hidden: Bug#80541: [Patch] GNU tail does now support option -F/--follow-forever]
Date: 08 May 2001 17:30:05 +0200
User-agent: Gnus/5.090003 (Oort Gnus v0.03) Emacs/21.0.103

Herbert Xu <address@hidden> wrote:

| Full details are available at
|       http://bugs.debian.org/80541
|
| In that thread, Christian Kurz also noted that FreeBSD's tail already
| supports a -F option whose behaviour is almost identical to this proposed
| option.  The same is true in NetBSD.

So it's somehow different?
If you describe how it's different, maybe we can arrange to make
it just like the *BSD versions of tail.

Thanks for the patch.
If you feel like working on this a little more, it'd be nice also to
update the usage function (--help output, and hence the man page)
and doc/textutils.texi.

| --
| Debian GNU/Linux 2.2 is out! ( http://www.debian.org/ )
| Email:  Herbert Xu ~{PmV>HI~} <address@hidden>
| Home Page: http://gondor.apana.org.au/~herbert/
| PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
| From: Christian Kurz <address@hidden>
| Subject: Bug#80541: [Patch] GNU tail does now support option 
-F/--follow-forever
| To: Debian Bug Tracking System <address@hidden>
| Date: Tue, 26 Dec 2000 17:45:49 +0100
| Reply-To: Christian Kurz <address@hidden>, address@hidden
| Resent-From: Christian Kurz <address@hidden>
|
| Package: textutils
| Version: 2.0-3
| Severity: wishlist
|
| Hi,
|
| after the discussion on debian-devel about the behaviour of tail to endlessly
| tail a logfile, Ethan Benson told me about the options --follow=name and
| --retry to get this behaviour. As I'm a bit lazy and don't want to type this
| long options regulary, I created a patch for tail to support -F and
| --follow-forever to generate this behaviour. You will find this patch at the
| end of the mail. I hope that you include it in our tail and send it also to 
the
| upstream maintainers. Thanks.
|
| Christian
|
| -- System Information
| Debian Release: woody
| Architecture: i386
| Kernel: Linux seteuid 2.4.0-test9 #1 Sun Oct 29 18:10:04 CET 2000 i586
|
| Versions of packages textutils depends on:
| ii  libc6                         2.2-6      GNU C Library: Shared libraries 
an
|
| -- Patch:
| diff -uNr textutils-2.0.old/src/tail.c textutils-2.0/src/tail.c
| --- textutils-2.0.old/src/tail.c      Thu Aug  5 16:38:02 1999
| +++ textutils-2.0/src/tail.c  Tue Dec 26 17:33:25 2000
| @@ -187,6 +187,7 @@
|    {"allow-missing", no_argument, NULL, CHAR_MAX + 1},
|    {"bytes", required_argument, NULL, 'c'},
|    {"follow", optional_argument, NULL, 'f'},
| +  {"follow-forever", optional_argument, NULL, 'F'},
|    {"lines", required_argument, NULL, 'n'},
|    {"max-unchanged-stats", required_argument, NULL, CHAR_MAX + 2},
|    {"max-consecutive-size-changes", required_argument, NULL, CHAR_MAX + 3},
| @@ -1311,7 +1312,7 @@
|    count_lines = 1;
|    forever = from_start = print_headers = 0;
|
| -  while ((c = getopt_long (argc, argv, "c:n:f::qs:v", long_options, NULL))
| +  while ((c = getopt_long (argc, argv, "c:n:f:F::qs:v", long_options, NULL))
|        != -1)
|      {
|        switch (c)
| @@ -1357,6 +1358,11 @@
|           follow_mode = XARGMATCH ("--follow", optarg,
|                                    follow_mode_string, follow_mode_map);
|         break;
| +
| +     case 'F':
| +       forever = 1;
| +       follow_mode = Follow_name;
| +       reopen_inaccessible_files =1;
|
|       case CHAR_MAX + 1:
|         reopen_inaccessible_files = 1;
|
| ----------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]