Re: ipcclean in 8.1 broken? - Mailing list pgsql-hackers

From Michael Paesold
Subject Re: ipcclean in 8.1 broken?
Date
Msg-id 013201c63ef3$28729210$67dc8380@zaphod
Whole thread Raw
In response to Re: ipcclean in 8.1 broken?  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian wrote:
> Tom Lane wrote:
>> Bruce Momjian <pgman@candle.pha.pa.us> writes:
>> > Tom Lane wrote:
>> >> (I'm not finding it right now, but I'm pretty sure that the SUS
>> >> specifies that numeric userid == 0 for superuser, whereas "root" is 
>> >> not
>> >> required to be the name, so this would be more correct anyway.)
>>
>> > Can we assume 'id' is on all unix systems?
>>
>> What's your point?  The script fails anyway if that bit doesn't work.
>
> Is 'id' better than what we have now if 'id' isn't widely supported?

I don't think this is really a question of portability. The variables $USER 
and $LOGNAME are not always set to the current (effective) user, e.g. on 
linux. That's Chris' current problem, I think. Just compare the difference 
of using "su" with and without the "-l" argument:

$ su
# echo $LOGNAME ; echo $USER
mip
mip
# exit
$ su -l
# echo $LOGNAME ; echo $USER
root
root
#

Of course, if you just want to question the use of "id", that's a different 
story.

Best Regards,
Michael Paesold 




pgsql-hackers by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: ipcclean in 8.1 broken?
Next
From: Tom Lane
Date:
Subject: Re: ipcclean in 8.1 broken?