mirror of
https://github.com/paxed/dgamelaunch.git
synced 2025-09-24 18:28:47 +02:00
More signal handling, this time for when running the game.
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@571 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
This commit is contained in:
parent
d623b5c0d6
commit
eb91e63f77
18
dgl-common.c
18
dgl-common.c
@ -346,7 +346,6 @@ dgl_exec_cmdqueue(struct dg_cmdpart *queue, int game, struct dg_user *me)
|
|||||||
clear();
|
clear();
|
||||||
refresh();
|
refresh();
|
||||||
endwin ();
|
endwin ();
|
||||||
signal(SIGWINCH, SIG_DFL);
|
|
||||||
|
|
||||||
/* first run the generic "do these when a game is started" commands */
|
/* first run the generic "do these when a game is started" commands */
|
||||||
dgl_exec_cmdqueue(globalconfig.cmdqueue[DGLTIME_GAMESTART], userchoice, me);
|
dgl_exec_cmdqueue(globalconfig.cmdqueue[DGLTIME_GAMESTART], userchoice, me);
|
||||||
@ -360,17 +359,24 @@ dgl_exec_cmdqueue(struct dg_cmdpart *queue, int game, struct dg_user *me)
|
|||||||
myconfig[userchoice]->bin_args[i] = tmpstr;
|
myconfig[userchoice]->bin_args[i] = tmpstr;
|
||||||
}
|
}
|
||||||
|
|
||||||
signals_block();
|
signal(SIGWINCH, SIG_DFL);
|
||||||
|
signal(SIGINT, SIG_DFL);
|
||||||
|
signal(SIGQUIT, SIG_DFL);
|
||||||
|
signal(SIGTERM, SIG_DFL);
|
||||||
idle_alarm_set_enabled(0);
|
idle_alarm_set_enabled(0);
|
||||||
/* launch program */
|
/* launch program */
|
||||||
ttyrec_main (userchoice, me->username,
|
ttyrec_main (userchoice, me->username,
|
||||||
dgl_format_str(userchoice, me, myconfig[userchoice]->ttyrecdir, NULL),
|
dgl_format_str(userchoice, me, myconfig[userchoice]->ttyrecdir, NULL),
|
||||||
gen_ttyrec_filename());
|
gen_ttyrec_filename());
|
||||||
|
|
||||||
/* lastly, run the generic "do these when a game is left" commands */
|
|
||||||
dgl_exec_cmdqueue(globalconfig.cmdqueue[DGLTIME_GAMEEND], userchoice, me);
|
|
||||||
idle_alarm_set_enabled(1);
|
idle_alarm_set_enabled(1);
|
||||||
signals_release();
|
/* lastly, run the generic "do these when a game is left" commands */
|
||||||
|
signal (SIGHUP, catch_sighup);
|
||||||
|
signal (SIGINT, catch_sighup);
|
||||||
|
signal (SIGQUIT, catch_sighup);
|
||||||
|
signal (SIGTERM, catch_sighup);
|
||||||
|
signal(SIGWINCH, sigwinch_func);
|
||||||
|
|
||||||
|
dgl_exec_cmdqueue(globalconfig.cmdqueue[DGLTIME_GAMEEND], userchoice, me);
|
||||||
|
|
||||||
setproctitle ("%s", me->username);
|
setproctitle ("%s", me->username);
|
||||||
initcurses ();
|
initcurses ();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user