coreutils - tail -f broken ???

Greg Schafer gschafer at zip.com.au
Wed May 7 21:23:38 PDT 2003


On Thu, May 08, 2003 at 12:03:08PM +1000, Ryan.Oliver at pha.com.au wrote:
> Possibly so, I haven't had it b0rk like this w 3.2.x ...
> 
> Could be due to the advanced nature of the buildhost... seeing how Zack is
> seeing it too its quite probable...
> ( funnily enough didn't see this issue when I built it... )

Ok, it seems definitely related to the _POSIX2_VERSION thing:-

gws at tigers-lfs:~$ tail -1 test.log
some junk
gws at tigers-lfs:~$ _POSIX2_VERSION=200112 tail -1 test.log 
tail: `-1' option is obsolete; use `-n 1'
Try `tail --help' for more information.


The info page talks about getting the POSIX state from the system (whatever
that means). The code in question (from lib/posixver.c) looks like:-

/* The POSIX version that utilities should conform to.  The default is
   specified by the system.  */

int
posix2_version (void)
{
  long int v = _POSIX2_VERSION;
  char const *s = getenv ("_POSIX2_VERSION");

  if (s && *s)
    {
      char *e;
      long int i = strtol (s, &e, 10);
      if (! *e)
        v = i;
    }

  return v < INT_MIN ? INT_MIN : v < INT_MAX ? v : INT_MAX;
}

I cannot find any mention of "_POSIX2_VERSION" in the gcc-3.3 source so I
don't really know what is going on.

Greg
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-dev' in the subject header of the message



More information about the lfs-dev mailing list