delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/09/01/15:26:07

From: "sl" <sl AT psycode DOT com DOT REMOVE_THIS>
Newsgroups: comp.os.msdos.djgpp
Subject: OS/2 + delay() bug
Date: Wed, 01 Sep 1999 14:54:48 -0400 (EDT)
Organization: Posted via Supernews, http://www.supernews.com
Lines: 32
Message-ID: <fycflpbqrpbz.fhe9vc0.pminews@nntp.generation.net>
X-Complaints-To: newsabuse AT supernews DOT com
X-Newsreader: PMINews 2.00.1205 For OS/2
MIME-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hello,

	I used the following source-code:

---------------------
#include <stdio.h>
#include <dos.h>
int main()
{
  printf("Before delay.\r\n");
  delay(1000);
  printf("After delay.\r\n");
  exit(0);
}
-------------------

	When running under OS/2 4.0, fixpack 10.. if the user presses PAUSE
while delay() is in effect, and attempts to unpause a second later, the
entire DOS session hangs.. It seems that delay() gets into an endless loop
due to the fact that it missed the target time it was waiting for. While the
program was paused, the 'target-time' was missed, and when the system was
unpaused delay() kept on waiting for the target-time which will not be
reached for another 24 hours .. That is an assumption on my part. I do not
actually know what is at fault but I do know the following for a fact:

1) OS/2 4.0, fixpack 10, 11 all hang as mentioned above (even on different
machines)
2) Win98 does NOT hang

Gili


- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019