* wrap/python/spot.i (unblock_signal): New function.

* wrap/python/cgi/ltl2tgba.in (print_footer, alarm_handler)
(reset_alarm): New functions.  Kill the script and its
children if it runs for too long.
(render_dot): Call reset_alarm.
This commit is contained in:
Alexandre Duret-Lutz 2004-02-04 22:56:06 +00:00
parent 44b351d23c
commit c38a3428f3
3 changed files with 62 additions and 5 deletions

View file

@ -30,6 +30,7 @@
#include <iostream>
#include <fstream>
#include <sstream>
#include <signal.h>
#include "misc/version.hh"
#include "misc/bddalloc.hh"
@ -207,4 +208,13 @@ print_on(std::ostream& on, const std::string& what)
on << what;
}
int
unblock_signal(int signum)
{
sigset_t set;
sigemptyset(&set);
sigaddset(&set, signum);
return sigprocmask(SIG_UNBLOCK, &set, 0);
}
%}