fixes for signal handling
This commit is contained in:
parent
99713d81a6
commit
b942c1ef13
@ -606,9 +606,6 @@ check_alarm_fail_int(int CONT USES_REGS)
|
||||
return CONT;
|
||||
}
|
||||
#endif
|
||||
if (Yap_get_signal( YAP_INT_SIGNAL ) ) {
|
||||
Yap_Error(PURE_ABORT, TermNil, "abort from console");
|
||||
}
|
||||
if (Yap_get_signal( YAP_FAIL_SIGNAL )) {
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -107,7 +107,6 @@ ProcessSIGINT(void)
|
||||
{
|
||||
CACHE_REGS
|
||||
int ch, out;
|
||||
printf("H\n");
|
||||
#if HAVE_ISATTY
|
||||
if (!isatty(0)) {
|
||||
return YAP_INT_SIGNAL;
|
||||
@ -259,7 +258,6 @@ Yap_external_signal(int wid, yap_signals sig)
|
||||
#endif
|
||||
do_signal(wid, sig PASS_REGS);
|
||||
LOCAL_PrologMode &= ~InterruptMode;
|
||||
p_debug( PASS_REGS1 );
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -1520,6 +1520,7 @@ ReceiveSignal (int s, void *x, void *y)
|
||||
{
|
||||
CACHE_REGS
|
||||
LOCAL_PrologMode |= InterruptMode;
|
||||
my_signal (s, ReceiveSignal);
|
||||
switch (s)
|
||||
{
|
||||
case SIGINT:
|
||||
@ -1577,6 +1578,7 @@ ReceiveSignal (int s, void *x, void *y)
|
||||
fprintf(stderr, "\n[ Unexpected signal ]\n");
|
||||
exit (s);
|
||||
}
|
||||
LOCAL_PrologMode &= ~InterruptMode;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user