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