Re: [shorty@debian.org: Bug#80541: [Patch] GNU tail does now support option -F/--follow-forever]
On Tue, May 08, 2001 at 05:30:05PM +0200, Jim Meyering wrote: Herbert Xu [EMAIL PROTECTED] 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? It's only cosmetic so it's probably not particularly important that we switch to their behaviour. The manual page for NetBSD's tail can be found at http://gondor.apana.org.au/~herbert/netbsd/tail.1 Thanks for the patch. The credit should go to Christian Kurz [EMAIL PROTECTED]. 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. Christian, would you like to do this? -- Debian GNU/Linux 2.2 is out! ( http://www.debian.org/ ) Email: Herbert Xu ~{PmVHI~} [EMAIL PROTECTED] Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt ___ Bug-textutils mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-textutils
Re: [shorty@debian.org: Bug#80541: [Patch] GNU tail does now support option -F/--follow-forever]
Herbert Xu [EMAIL PROTECTED] 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 ~{PmVHI~} [EMAIL PROTECTED] | Home Page: http://gondor.apana.org.au/~herbert/ | PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt | From: Christian Kurz [EMAIL PROTECTED] | Subject: Bug#80541: [Patch] GNU tail does now support option -F/--follow-forever | To: Debian Bug Tracking System [EMAIL PROTECTED] | Date: Tue, 26 Dec 2000 17:45:49 +0100 | Reply-To: Christian Kurz [EMAIL PROTECTED], [EMAIL PROTECTED] | Resent-From: Christian Kurz [EMAIL PROTECTED] | | 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; | | -- ___ Bug-textutils mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-textutils
[shorty@debian.org: Bug#80541: [Patch] GNU tail does now support option -F/--follow-forever]
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. -- Debian GNU/Linux 2.2 is out! ( http://www.debian.org/ ) Email: Herbert Xu ~{PmVHI~} [EMAIL PROTECTED] Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt 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.cThu Aug 5 16:38:02 1999 +++ textutils-2.0/src/tail.cTue 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;