Mail Archives: djgpp/2000/05/16/20:45:26
A user of my program may terminate it with a Ctrl+C because they are
impatient waiting for some event or if the program hangs (I'm
implementing timeouts so this will occur less).
I'm not familiar with how to block SIGINT. Do I need to block it for
the entire program or just before & after calling uclock?
I'm also not familiar with 'signal' and the other 2 items. I guess
they are ways to terminate programs or at least provide some flag to a
program?
Does anyone know of a "fix" for uclock as Eli has hinted at?
Thank-you for all your help.
On Tue, 16 May 2000 17:00:06 +0300 (IDT), Eli Zaretskii
<eliz AT is DOT elta DOT co DOT il> wrote:
>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 -