# HG changeset patch # User John "Elwin" Edwards # Date 1433772085 14400 # Node ID 600873555ec09abbd0053bd4808e0986c09e9fa3 # Parent 78ca6502d2a637c41f92563acc966192575cb151 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. diff -r 78ca6502d2a6 -r 600873555ec0 arogue5/mdport.c --- a/arogue5/mdport.c Fri Jun 05 18:02:17 2015 -0400 +++ b/arogue5/mdport.c Mon Jun 08 10:01:25 2015 -0400 @@ -403,9 +403,9 @@ while (wait(&ret_status) != pid) continue; - signal(SIGINT, myquit); + signal(SIGINT, myend); #ifdef SIGQUIT - signal(SIGQUIT, myend); + signal(SIGQUIT, myquit); #endif } diff -r 78ca6502d2a6 -r 600873555ec0 arogue7/mdport.c --- a/arogue7/mdport.c Fri Jun 05 18:02:17 2015 -0400 +++ b/arogue7/mdport.c Mon Jun 08 10:01:25 2015 -0400 @@ -385,9 +385,9 @@ while (wait(&ret_status) != pid) continue; - signal(SIGINT, myquit); + signal(SIGINT, myend); #ifdef SIGQUIT - signal(SIGQUIT, myend); + signal(SIGQUIT, myquit); #endif } diff -r 78ca6502d2a6 -r 600873555ec0 rogue3/mdport.c --- a/rogue3/mdport.c Fri Jun 05 18:02:17 2015 -0400 +++ b/rogue3/mdport.c Mon Jun 08 10:01:25 2015 -0400 @@ -596,9 +596,9 @@ while (wait(&ret_status) != pid) continue; - signal(SIGINT, myquit); + signal(SIGINT, myend); #ifdef SIGQUIT - signal(SIGQUIT, myend); + signal(SIGQUIT, myquit); #endif } return(ret_status); diff -r 78ca6502d2a6 -r 600873555ec0 rogue4/mdport.c --- a/rogue4/mdport.c Fri Jun 05 18:02:17 2015 -0400 +++ b/rogue4/mdport.c Mon Jun 08 10:01:25 2015 -0400 @@ -432,9 +432,9 @@ while (wait(&ret_status) != pid) continue; - signal(SIGINT, myquit); + signal(SIGINT, myend); #ifdef SIGQUIT - signal(SIGQUIT, myend); + signal(SIGQUIT, myquit); #endif } diff -r 78ca6502d2a6 -r 600873555ec0 rogue5/mdport.c --- a/rogue5/mdport.c Fri Jun 05 18:02:17 2015 -0400 +++ b/rogue5/mdport.c Mon Jun 08 10:01:25 2015 -0400 @@ -598,9 +598,9 @@ while (wait(&ret_status) != pid) continue; - signal(SIGINT, myquit); + signal(SIGINT, myend); #ifdef SIGQUIT - signal(SIGQUIT, myend); + signal(SIGQUIT, myquit); #endif } return(ret_status); diff -r 78ca6502d2a6 -r 600873555ec0 srogue/mdport.c --- a/srogue/mdport.c Fri Jun 05 18:02:17 2015 -0400 +++ b/srogue/mdport.c Mon Jun 08 10:01:25 2015 -0400 @@ -610,9 +610,9 @@ while (wait(&ret_status) != pid) continue; - signal(SIGINT, myquit); + signal(SIGINT, myend); #ifdef SIGQUIT - signal(SIGQUIT, myend); + signal(SIGQUIT, myquit); #endif } return(ret_status);