Final Suggestion (Re: suggested bsd-setproctitle.c)

Mark D. Roth roth at feep.net
Wed Nov 8 16:52:05 EST 2000


On Tue Nov 07 22:59 2000 -0600, Ben Lindstrom wrote:
> I would perfer using basename() over strrchar() and NULL check.  Even it
> it required me to snag basename() from the OpenBSD tree. (Which I was
> happy to see compiled without any changes!! =)

The NULL check actually had nothing to do with strrchr() (although now
that you mention it, I should have checked strrchr()'s result as
well).  The real purpose was to make sure xstrdup() didn't fail
because we're out of memory.  Admittedly, this is a very unprobable
situation, but there might be problems if __progname is set to NULL
later in the code.

Also, I have encountered some fairly serious problems in the past with
systems which have basename() calls that don't work properly.  The
most notable example of this was Linux systems running early versions
of glibc 2.0.  None of these bugs should affect the code we're talking
about, but I'd feel a lot more comfortable if some folks with RedHat
6.0 systems could test it for us.  (All my Linux machines are at 6.1
or 6.2 by now.)

Other than these nitpicks, it looks fine to me.  I'll actually test it
once we have a bit more of a consensus. ;)

-- 
Mark D. Roth <roth at feep.net>
http://www.feep.net/~roth/





More information about the openssh-unix-dev mailing list