Wednesday, July 27, 2005

spawnve

There was this patch on the bash mailing about making bash run faster on cygwin.

It was pointed out that there were issues with signal handling after the patch is applied.
After the function in the patch is called SIGINT handler is getting lost making the shell to exit instead of just cancelling the current line.

A quick look at the patch shows the following code.

+ sigdelset(&child_sig_mask, SIGTSTP);
+ sigdelset(&child_sig_mask, SIGTTIN);
+ sigdelset(&child_sig_mask, SIGTTOU);

Job control signals are removed from the child_sig_mask,so does that mean they will not be blocked?
In any case the mask was set to top_level_mask instead of child_sig_mask in the following line and was pointed out.

+ sigprocmask (SIG_SETMASK, &top_level_mask, &old_sig_mask);

0 Comments:

Post a Comment

<< Home