Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1122 → Rev 1123

/demos/trunk/simcity/simcity.c
76,23 → 76,6
cprintf("Ferrari Fabio\n");
}
 
void demo_exc_handler(int signo, siginfo_t *info, void *extra)
{
struct timespec t;
 
grx_close();
/* Default action for an kern exception is */
kern_cli();
ll_gettime(TIME_EXACT, &t),
kern_printf("\nS.Ha.R.K. Exception raised!!!"
"\nTime (s:ns) :%ld:%ld"
"\nException number:%d"
"\nPID :%d\n",
t.tv_sec, t.tv_nsec, info->si_value.sival_int,
info->si_task);
sys_end();
}
 
void my_close(void *arg)
{
grx_close();
103,20 → 86,9
{
int i;
char tl_name[4];
struct sigaction action;
 
version();
 
/* Init the standard Hartik exception handler */
/* Set the signal action */
action.sa_flags = SA_SIGINFO;
action.sa_sigaction = demo_exc_handler;
action.sa_handler = 0;
sigfillset(&action.sa_mask); /* we block all the other signals... */
if (sigaction(SIGHEXC, &action, NULL) == -1) {
perror("Error initializing signals...");
sys_end();
}
sys_atrunlevel(my_close, NULL, RUNLEVEL_BEFORE_EXIT);
 
//resetting kill flags