sleep sometimes hangs. This is corrected

This commit is contained in:
ceriel 1987-04-23 15:20:41 +00:00
parent 913a1f0b8f
commit 08ad853ac5

View file

@ -26,9 +26,9 @@ sleep(n)
enough
*/
if (oldalarm > n) oldalarm -= n;
else {
n = oldalarm;
oldalarm = 1;
else if (oldalarm) {
n = oldalarm;
oldalarm = 1;
}
oldsig = signal(SIGALRM, alfun);
alarm(n);