Re: [dev] [sbase] [patch] Add logname(1)

From: sin <>
Date: Fri, 18 Oct 2013 18:08:34 +0300

On Fri, Oct 18, 2013 at 10:39:08PM +0800, Chris Down wrote:
> On 2013-10-18 17:32, lambda lambda wrote:
> > Hi guys and thank you for your hard work so far. I'm sending my first
> > patch here. As the subject says, i'm adding logname(1).
> More complex logname variants look at the terminal connected to stdin to work
> out the login name. This, however, sucks, just as much as writing a full
> program just to print out an environment variable.

I think the most portable/sensible means is to simply inspect the environment. I also
had a look at musl's implementation of getlogin() and that is basically getenv("LOGNAME").

If there is enough reason to include logname, such as existing scripts using it etc.
then I would not mind adding this to sbase.

Received on Fri Oct 18 2013 - 17:08:34 CEST

This archive was generated by hypermail 2.3.0 : Fri Oct 18 2013 - 17:12:07 CEST