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:
parent
6ab6c944fb
commit
5d0e3dd646
6 changed files with 12 additions and 12 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue