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.
This commit is contained in:
John "Elwin" Edwards 2015-06-08 10:01:25 -04:00
parent 6ab6c944fb
commit 5d0e3dd646
6 changed files with 12 additions and 12 deletions

View file

@ -403,9 +403,9 @@ md_shellescape()
while (wait(&ret_status) != pid)
continue;
signal(SIGINT, myquit);
signal(SIGINT, myend);
#ifdef SIGQUIT
signal(SIGQUIT, myend);
signal(SIGQUIT, myquit);
#endif
}