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

Kevin Steves stevesk at sweden.hp.com
Thu Nov 9 02:03:49 EST 2000


On Wed, 8 Nov 2000, Ben Lindstrom wrote:
: > I'd prefer adding a set_progname() modified to return progname, and
: > using it vs. importing bsd-basename and mallocing space.
: > 
: > So in main() we'd have:
: > 
: > __progname = set_progname(argv[0]);
: > 
: For as much as I dislike functions that modify global variables. I think

I agree regarding modifying globals.

: the orignal set_progname() may be better then changing it to return the
: progname.  I don't believe we should be setting __progname unless it's not
: set originally.

I was thinking of:

#ifdef HAVE___PROGNAME
	return __progname;
#else
        ...

: Unless you plan on moving the #ifndef .. #endif to around the call in
: main().

I was trying to avoid that, but if we don't want to assign __progname to
itself, it's fine with me.






More information about the openssh-unix-dev mailing list