Date: Wed, 1 Nov 1995 02:59:39 +0300 (MSK) From: =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= (aka Andrey A. Chernov, Black Mage) <ache@astral.msk.su> To: CVS-commiters@freefall.freebsd.org, cvs-CVSROOT@freefall.freebsd.org, Peter Wemm <peter@freefall.freebsd.org> Subject: Re: cvs commit: CVSROOT log_accum.pl Message-ID: <aBhXhbmmt7@ache.dialup.demos.ru> In-Reply-To: <aBREhbmuj6@ache.dialup.demos.ru>; from =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= at Wed, 1 Nov 1995 02:39:07 %2B0300 (MSK) References: <199510312317.PAA00986@freefall.freebsd.org> <aBREhbmuj6@ache.dialup.demos.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <aBREhbmuj6@ache.dialup.demos.ru> =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= writes: >In message <199510312317.PAA00986@freefall.freebsd.org> Peter Wemm > writes: >>peter 95/10/31 15:17:14 (peter/633/peter) >> Modified: . log_accum.pl >> Log: >> For the moment, prefer the getpwuid($<) value over getlogin.. >> Remove debugging output again.. (which proved that getlogin returns the >> wrong value sometimes..) >getlogin depends on internal variable _logname_valid which is set >after first sucessful getlogin call, then getlogin simple return >its static data and even not issue syscall!!! >How perl calls C-functions, it is the question... >Maybe it call each C-function in the fork? I.e. _longname_valid >always 0 for getlogin? Then it is perl bug, it seems that >it change uids on the fly, then call getlogin for each of them. You can to localize perl miss with simple script like: #!/usr/bin/perl while(1) { print getlogin(); print " "; print ((getpwuid($<))[0]); print "\n"; } If it works right, try to reproduce sequence from CVS .pl exactly (in the infinite loop). -- Andrey A. Chernov : And I rest so composedly, /Now, in my bed, ache@astral.msk.su : That any beholder /Might fancy me dead - http://dt.demos.su/~ache : Might start at beholding me, /Thinking me dead. RELCOM Team,FreeBSD Team : E.A.Poe From "For Annie" 1849
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?aBhXhbmmt7>