Re: ipcclean in 8.1 broken?
Michael Paesold <mpaesold@gmx.at>
From: "Michael Paesold" <mpaesold@gmx.at>
To: "Bruce Momjian" <pgman@candle.pha.pa.us>, "Tom Lane" <tgl@sss.pgh.pa.us>
Cc: "Christopher Kings-Lynne" <chriskl@familyhealth.com.au>, "Peter Eisentraut" <peter_e@gmx.net>, <pgsql-hackers@postgresql.org>
Date: 2006-03-03T18:49:08Z
Lists: 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