Re: history (was Re: base-files: LOGNAME)

2010-06-28 Thread Eric Backus
Cyrille Lefevre writes: > sunos, login(1) both set USER and LOGNAME using pwd->pw_name ... > solaris, login(1) only set LOGNAME ... > sys5r4, same as solaris, but ... > irix, login(1) and logname(1) does as sunos ... > osf1, login(1) does as sunos, logname(1) as solaris At least historically, HP

history (was Re: base-files: LOGNAME)

2010-06-25 Thread Cyrille Lefevre
Le 31/05/2010 13:22, Andy Koppe a écrit : Posix defines LOGNAME, but regarding USER it only says that it is "unwise to conflict with certain variables that are frequently exported by widely used command interpreters and applications". (http://opengroup.org/onlinepubs/007908799/xbd/envvar.html)

Re: base-files: LOGNAME

2010-05-31 Thread Corinna Vinschen
On May 31 11:56, Yaakov S wrote: > On 2010-05-31 10:58, Corinna Vinschen wrote: > >I don't know where the logname tool is getting the wrong case from. But > >that still allows to do an `export LOGNAME=$USER' > > Per POSIX, logname(1) must output the exact value of getlogin(3). Good hint. Actual

Re: base-files: LOGNAME

2010-05-31 Thread Yaakov (Cygwin/X)
On 2010-05-31 10:58, Corinna Vinschen wrote: I don't know where the logname tool is getting the wrong case from. But that still allows to do an `export LOGNAME=$USER' Per POSIX, logname(1) must output the exact value of getlogin(3). Yaakov -- Problem reports: http://cygwin.com/problem

Re: base-files: LOGNAME

2010-05-31 Thread Corinna Vinschen
On May 31 17:58, Corinna Vinschen wrote: > On May 31 16:18, John Morrison wrote: > > On Mon, May 31, 2010 1:22 pm, Corinna Vinschen wrote: > > > On May 30 13:11, Yaakov S wrote: > > >> On 2010-05-30 04:31, John Morrison wrote: > > >> >Could we do; > > >> > > > >> >LOGNAME=$USERNAME > > >> >export L

Re: base-files: LOGNAME

2010-05-31 Thread Corinna Vinschen
On May 31 16:18, John Morrison wrote: > On Mon, May 31, 2010 1:22 pm, Corinna Vinschen wrote: > > On May 30 13:11, Yaakov S wrote: > >> On 2010-05-30 04:31, John Morrison wrote: > >> >Could we do; > >> > > >> >LOGNAME=$USERNAME > >> >export LOGNAME > >> > > >> >instead? > >> > >> I'm not sure those

Re: base-files: LOGNAME

2010-05-31 Thread John Morrison
On Mon, May 31, 2010 1:22 pm, Corinna Vinschen wrote: > On May 30 13:11, Yaakov S wrote: >> On 2010-05-30 04:31, John Morrison wrote: >> >Could we do; >> > >> >LOGNAME=$USERNAME >> >export LOGNAME >> > >> >instead? >> >> I'm not sure those are always equivalent, but I'm no expert on POSIX. > > USER

Re: base-files: LOGNAME

2010-05-31 Thread Corinna Vinschen
On May 30 13:11, Yaakov S wrote: > On 2010-05-30 04:31, John Morrison wrote: > >Could we do; > > > >LOGNAME=$USERNAME > >export LOGNAME > > > >instead? > > I'm not sure those are always equivalent, but I'm no expert on POSIX. USERNAME is the Windows username. LOGNAME should be rather equivalent

Re: base-files: LOGNAME

2010-05-31 Thread John Morrison
On Mon, May 31, 2010 12:22 pm, Andy Koppe wrote: > On 31 May 2010 09:18, Corinna Vinschen wrote: >> On May 30 10:02, Andy Koppe wrote: >>> On Sunday, May 30, 2010, Yaakov wrote: >>> > POSIX.1[1] describes a LOGNAME environment variable which represents >>> the user's login name.  Adding the followi

Re: base-files: LOGNAME

2010-05-31 Thread Andy Koppe
On 31 May 2010 09:18, Corinna Vinschen wrote: > On May 30 10:02, Andy Koppe wrote: >> On Sunday, May 30, 2010, Yaakov wrote: >> > POSIX.1[1] describes a LOGNAME environment variable which represents the >> > user's login name.  Adding the following lines to /etc/profile should do >> > the trick:

Re: base-files: LOGNAME

2010-05-31 Thread Corinna Vinschen
On May 30 10:02, Andy Koppe wrote: > On Sunday, May 30, 2010, Yaakov wrote: > > POSIX.1[1] describes a LOGNAME environment variable which represents the > > user's login name.  Adding the following lines to /etc/profile should do > > the trick: > > > > LOGNAME="`logname`" > > export LOGNAME > > >

Re: base-files: LOGNAME

2010-05-30 Thread Yaakov (Cygwin/X)
On 2010-05-30 04:31, John Morrison wrote: Could we do; LOGNAME=$USERNAME export LOGNAME instead? I'm not sure those are always equivalent, but I'm no expert on POSIX. Yaakov -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentatio

Re: base-files: LOGNAME

2010-05-30 Thread Yaakov (Cygwin/X)
On 2010-05-30 04:02, Andy Koppe wrote: That would mean a costly fork() during shell startup. Could this be set in the DLL instead, as happens with the SHELL variable? I'm not sure one more will matter; e.g. USER is set via `id -un`. Yaakov -- Problem reports: http://cygwin.com/problems

Re: base-files: LOGNAME

2010-05-30 Thread John Morrison
On Sun, May 30, 2010 10:02 am, Andy Koppe wrote: > On Sunday, May 30, 2010, Yaakov wrote: >> POSIX.1[1] describes a LOGNAME environment variable which represents the >> user's login name.  Adding the following lines to /etc/profile should do >> the trick: >> >> LOGNAME="`logname`" >> export LOGNAME

Re: base-files: LOGNAME

2010-05-30 Thread Andy Koppe
On Sunday, May 30, 2010, Yaakov wrote: > POSIX.1[1] describes a LOGNAME environment variable which represents the > user's login name.  Adding the following lines to /etc/profile should do the > trick: > > LOGNAME="`logname`" > export LOGNAME > > Where logname(1) is a program supplied by coreutil

base-files: LOGNAME

2010-05-30 Thread Yaakov (Cygwin/X)
POSIX.1[1] describes a LOGNAME environment variable which represents the user's login name. Adding the following lines to /etc/profile should do the trick: LOGNAME="`logname`" export LOGNAME Where logname(1) is a program supplied by coreutils whose presence is required by POSIX.1[2]. Could