talk session

Jamie Mason jmason at gpu.utcs.utoronto.ca
Wed May 8 01:58:40 AEST 1991


In article <1991May7.000521.28186 at athena.cs.uga.edu> greg at athena.cs.uga.edu (Greg Whitlock) writes:

>------------------------>cut here<------------------------------
>/*
> *
> *	scat - written by gordon.edwards at atlantaga.ncr.com
> *
> *	This short program displays the contents of a file with delays
> *	after each line.  
                            .
                            .
                            .
>	while ((c = getc(fp)) != EOF)
>	{
>		printf("%c", c);
>		for (i = 0; i < delay; i++)
>			;
>	}

	Do I see a *BUSY WAIT*?!?  On a multi-user system like Unix?
*OUCH*!  How about using usleep?

Jamie  ...  Segmentation fault (core dumped)
Written On  Tuesday, May 7, 1991  at  11:57:25am EDT



More information about the Comp.unix.wizards mailing list