Mail Archives: djgpp/2000/05/16/10:34:27
On Mon, 15 May 2000, Tim Updegrove wrote:
> Thank-you for asking for a small test case. In creating it, I found a
> key piece of info. It only fails after doing a Control+C in a Windows
> 98 SE (also Win95) and then restarting the program. The 1st time it
> runs great but after killing it and restarting it, then it fails the
> very first time. What is Windows doing?
Yes, it looks like if you interrupt `utime', the emulation of the timer
for that DOS box is screwed up and will refuse to be reprogrammed.
> Is there a fix?
A simple solution is to block SIGINT while you run that loop. You don't
really need to stop it with Ctrl-C, do you? You could, for example, use
`signal' and SIG_IGN, or `sigprocmask' for that.
It is also possible that some changes inside `uclock' will make it more
robust in these cases (e.g., perhaps there's some command to reset the
PIT, and if used inside `uclock', it would restore the virtualized PIT
to its normal state). But I didn't have enoug time to look for such a
solution; volunteers are welcome, as usual.
- Raw text -