Mercurial > hg > early-roguelike
comparison rogue4/mdport.c @ 162:600873555ec0
Don't swap signal handlers in md_shellescape().
md_shellescape() sets SIGINT and SIGQUIT to be ignored, storing the
previous handlers, and restores them after the shell exits. But it
mixed up the two handlers.
Since the signals were usually handled by the same function, this fix
doesn't have much effect, but anything that makes signal code less
confusing is a good thing.
author | John "Elwin" Edwards |
---|---|
date | Mon, 08 Jun 2015 10:01:25 -0400 |
parents | 65f3da34578a |
children | d53b13637783 |
comparison
equal
deleted
inserted
replaced
161:78ca6502d2a6 | 162:600873555ec0 |
---|---|
430 myquit = signal(SIGQUIT, SIG_IGN); | 430 myquit = signal(SIGQUIT, SIG_IGN); |
431 #endif | 431 #endif |
432 while (wait(&ret_status) != pid) | 432 while (wait(&ret_status) != pid) |
433 continue; | 433 continue; |
434 | 434 |
435 signal(SIGINT, myquit); | 435 signal(SIGINT, myend); |
436 #ifdef SIGQUIT | 436 #ifdef SIGQUIT |
437 signal(SIGQUIT, myend); | 437 signal(SIGQUIT, myquit); |
438 #endif | 438 #endif |
439 } | 439 } |
440 | 440 |
441 return(ret_status); | 441 return(ret_status); |
442 #endif | 442 #endif |