[illumos-Developer] [REVIEW] 244: Need replacement for closed /usr/bin/tail and /usr/xpg4/bin/tail

I. Szczesniak iszczesniak at gmail.com
Wed Sep 22 08:58:13 PDT 2010


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.

>> - 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.

Irek



More information about the Developer mailing list