[illumos-Developer] [REVIEW] 244: Need replacement for closed /usr/bin/tail and /usr/xpg4/bin/tail
Garrett D'Amore
garrett at nexenta.com
Wed Sep 22 09:20:49 PDT 2010
On Wed, 2010-09-22 at 17:58 +0200, I. Szczesniak wrote:
> On Wed, Sep 22, 2010 at 5:26 PM, Garrett D'Amore <garrett at nexenta.com> wrote:
> > On Wed, 2010-09-22 at 17:21 +0200, I. Szczesniak wrote:
> >> On Wed, Sep 22, 2010 at 2:31 PM, Garrett D'Amore <garrett at nexenta.com> wrote:
> >> > Does the ksh93 tail work well? I had heard that there were some
> >> > situations where it was busted, but I've not researched it myself.
> >>
> >> To my knowledge AST tail version in ON B146 has 2 known bugs:
> >> - tail -0f will cat the whole file before following it. The tail.c in
> >> Roland's prototype40 tree has this fixed.
> >
> > I think it was this problem that was what had been complained about.
> > Unfortunately, we don't have that code in illumos, and I have no idea
> > how to go about getting it from Roland's private workspace (and there is
> > of course the question of whether doing so is a good idea or not....)
>
> The new tail.c can be downloaded from
> http://svn.genunix.org/repos/on/branches/ksh93/gisburn/prototype040/usr/src/libcmd/common/tail.c
>
> Furthermore, if neither Roland or Olga respond by Saturday evening I
> am happy to try to merge Roland's workspace into Illumos myself or
> assign one of my own engineers to do it. I've been reluctant to do it
> in the past because we lack much of the testing infrastructure and
> detail knowledge but a pure merge should not be hard.
Sure. I'd actually encourage you to start with just one or two (but not
a dozen please!) ksh93 utilities as part of this work. For example,
printf is probably extremely low risk, and extremely obvious.
Roland in the past had a habit of trying to merge ~universe with each
integration, which made a review of the deltas almost impossible to
manage, never mind separate testing. I think this was partly because
it was so difficult to integrate into ON from outside Sun. I'd like to
make that much easier for illumos, so that we can get more smaller
integrations with lower overall risk.
>
> >> - Suspending the tail builtin *within* ksh93 and resuming it causes
> >> SIGTERM to be ignored. This is a bug in all 64bit versions of ksh93,
> >> affecting all builtin commands which use poll() in combination with
> >> custom signal handlers and not a bug in AST tail. Using tail via
> >> /usr/bin/alias is not effected by this issue.
> >
> > That sounds like an unfortunate bug. I hope someone will fix it.
>
> I think either Roland, Glenn Fowler or David Korn are looking at it.
> But this should not be concern to *us* who seek to replace
> /usr/bin/tail and /usr/xpg4/bin/tail, both which are external
> utilities and thus not affected.
Agreed.
That said, Chris has already done a lot of work to drive towards
integration. Unless there is some substantial reason that the ksh93 is
superior (or conversely, that Chris' version is inferior), then I'd just
assume let him drive forward with this particular integration.
- Garrett
More information about the Developer
mailing list