methods for catching the user CTRL-C interrupt
Definition in file interrupt.h.
Go to the source code of this file.
Functions | |
SCIP_RETCODE | SCIPinterruptCreate (SCIP_INTERRUPT **interrupt) |
void | SCIPinterruptFree (SCIP_INTERRUPT **interrupt) |
void | SCIPinterruptCapture (SCIP_INTERRUPT *interrupt) |
void | SCIPinterruptRelease (SCIP_INTERRUPT *interrupt) |
SCIP_Bool | SCIPinterrupted (void) |
SCIP_Bool | SCIPterminated (void) |
void | SCIPtryTerminate (void) |
void | SCIPresetInterrupted (void) |
SCIP_RETCODE SCIPinterruptCreate | ( | SCIP_INTERRUPT ** | interrupt | ) |
creates a CTRL-C interrupt data
interrupt | pointer to store the CTRL-C interrupt data |
Definition at line 91 of file interrupt.c.
References assert(), BMSallocMemory, NULL, SCIP_ALLOC, and SCIP_OKAY.
Referenced by doScipCreate().
void SCIPinterruptFree | ( | SCIP_INTERRUPT ** | interrupt | ) |
frees a CTRL-C interrupt data
interrupt | pointer to the CTRL-C interrupt data |
Definition at line 104 of file interrupt.c.
References assert(), BMSfreeMemory, and NULL.
Referenced by SCIPfree().
void SCIPinterruptCapture | ( | SCIP_INTERRUPT * | interrupt | ) |
captures the CTRL-C interrupt to call the SCIP's own interrupt handler
interrupt | CTRL-C interrupt data |
Definition at line 114 of file interrupt.c.
References assert(), interruptHandler(), ninterrupts, nterms, NULL, SCIP_Interrupt::nuses, and SCIP_Interrupt::oldsigaction.
Referenced by SCIPpresolve(), and SCIPsolve().
void SCIPinterruptRelease | ( | SCIP_INTERRUPT * | interrupt | ) |
releases the CTRL-C interrupt and restores the old interrupt handler
interrupt | CTRL-C interrupt data |
Definition at line 144 of file interrupt.c.
References assert(), NULL, SCIP_Interrupt::nuses, and SCIP_Interrupt::oldsigaction.
Referenced by SCIPpresolve(), and SCIPsolve().
SCIP_Bool SCIPinterrupted | ( | void | ) |
returns whether the user interrupted by pressing CTRL-C
Definition at line 163 of file interrupt.c.
References ninterrupts, and SCIP_Bool.
Referenced by SCIPpressedCtrlC(), and SCIPsolveIsStopped().
SCIP_Bool SCIPterminated | ( | void | ) |
returns whether the process has received a SIGTERM
returns whether a process termination signal was received
Definition at line 171 of file interrupt.c.
References nterms, and SCIP_Bool.
Referenced by SCIPsolveIsStopped().
void SCIPtryTerminate | ( | void | ) |
sends a termination signal to all SCIP processes so that they try to terminate as soon as possible
Definition at line 182 of file interrupt.c.
References nterms.
Referenced by handleSigterm().
void SCIPresetInterrupted | ( | void | ) |
resets the number of interrupts to 0
Definition at line 190 of file interrupt.c.
References ninterrupts, and nterms.
Referenced by SCIPsolveIsStopped().