alarm() seem to be broken on machines that I have upgraded using the
June 2000 product suit CD. (4.25D w/ security patch) I upgraded by
invoking /cd/bin/phinstall - not by using the boot floppy.
After I upgraded my FTP server machine my port of proftpd died with
a timeout message… After fixing the passwd/shadow access and much
fiddling around I discovered that alarm() was not returning the
remaining time - it was returning garbage! But only on the machine I
just upgraded… I have included results from two machines here - one
works as expecetd - the other is the living embodiment of FUBAR…
I also have a machine in the field with the same problem – what’s the
deal – is alarm() broken - Did I screw up the install somehow - is
there an “old” library lurking about - is the newer Proc causing this?
?!?!?!?!?!?
I have isolated the problem in the program included below:
you can compile the program using cc – gcc also shows the same
problem
Also note that the “remaining time” on the broken version is not the
same on each run but will stabliize after the first call i.e 131323,
or 259789016 or… well you get the idea…
Let me know – I’ve got a dead site at the moment…
– Bill
---- test program…
#include <stdio.h>
#include <unistd.h>
// should return a bunck of zeros with the exception of (maybe) the /
// first call
int main( void )
{
unsigned int timeleft;
timeleft = alarm( 0 );
printf( “Initial Time : %d\n”, timeleft );
timeleft = alarm( 0 );
printf( “Initial Time : %d\n”, timeleft );
timeleft = alarm( 0 );
printf( “Initial Time : %d\n”, timeleft );
timeleft = alarm( 0 );
printf( “Initial Time : %d\n”, timeleft );
timeleft = alarm( 0 );
printf( “Initial Time : %d\n”, timeleft );
timeleft = alarm( 0 );
printf( “Initial Time : %d\n”, timeleft );
return (0);
}
– results of run on “working system”
Initial Time : 0
Initial Time : 0
Initial Time : 0
Initial Time : 0
Initial Time : 0
Initial Time : 0
– working system sin ver
PROGRAM NAME VERSION DATE
sys/Proc32 Proc 4.25I Nov 25 1998
sys/Proc32 Slib16 4.23G Oct 04 1996
sys/Slib32 Slib32 4.24B Aug 12 1997
/bin/Fsys Fsys32 4.24T Feb 26 1999
/bin/Fsys Floppy 4.24B Aug 19 1997
/bin/Fsys.eide eide 4.24N Nov 18 1998
//2/bin/Dev32 Dev32 4.23G Oct 04 1996
//2/bin/Dev32.ansi Dev32.ansi 4.23H Nov 21 1996
//2/bin/Dev32.ser Dev32.ser 4.23I Jun 27 1997
//2/bin/Dev32.par Dev.par 4.26 Feb 24 2000
//2/bin/Net Net 4.25C Aug 30 1999
//2/bin/Net.tulip Net.tulip 4.25Q Aug 30 1999
//2/bin/Iso9660fsys Iso9660fsys 4.23D Mar 20 2000
//2/bin/Dosfsys Dosfsys 4.23E Jan 21 1997
//2/bin/Pipe Pipe 4.23A Feb 26 1996
//2/usr/bin/lpsrvr lpsrvr 4.24A Jun 26 1997
//2/bin/Dev32.pty Dev32.pty 4.23G Oct 04 1996
//2//photon/bin/Photon Photon 1.14B Sep 03 1999
//2//bin/phfontpfr Photon Font 1.14H Jun 05 2000
------ Upgraded machine program results… Yikes!!!
Initial Time : 6
Initial Time : -1476394993
Initial Time : -1476394993
Initial Time : -1476394993
Initial Time : -1476394993
Initial Time : -1476394993
------ sin ver results…
PROGRAM NAME VERSION DATE
sys/Proc32 Proc 4.25J Sep 09 1999
sys/Proc32 Slib16 4.23G Oct 04 1996
sys/Slib32 Slib32 4.24B Aug 12 1997
/bin/Fsys Fsys32 4.24V Feb 18 2000
/bin/Fsys Floppy 4.24B Aug 19 1997
/bin/Fsys.eide eide 4.25A Feb 09 2000
//1/bin/Dev32 Dev32 4.23G Oct 04 1996
//1/bin/Dev32.ansi Dev32.ansi 4.23H Nov 21 1996
//1/bin/Dev32.ser Dev32.ser 4.23I Jun 27 1997
//1/bin/Dev32.par Dev.par 4.26 Feb 24 2000
//1/bin/Net Net 4.25C Aug 30 1999
//1/bin/Net.ether1000 Net.ether100 4.24B Jul 24 1998
//1/bin/Iso9660fsys Iso9660fsys 4.23D Mar 20 2000
//1/bin/Dosfsys Dosfsys 4.23E Jan 21 1997
//1/bin/Pipe Pipe 4.23A Feb 26 1996
//1/bin/Dev32.pty Dev32.pty 4.23G Oct 04 1996
//1/*/usr/ucb/Socket Socket 4.25H Jul 30 1999