You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.
I have a server that just sits quietly in a tmux window, watching pins and doing it's thing. But if I attach it and my window size changes, it dies. The reason is that source/c_pwm/pwm.c traps all signals, even those that are normally ignored:
// Catch all signals possible - it is vital we kill the DMA engine
// on process exit!
static void
setup_sighandlers(void)
{
int i;
for (i = 0; i < 64; i++) {
struct sigaction sa;
memset(&sa, 0, sizeof(sa));
sa.sa_handler = (void *) terminate;
sigaction(i, &sa, NULL);
}
}
I believe #19 and #15 are really this bug. But I put this here because the bug is more general than those issues.
The text was updated successfully, but these errors were encountered:
I helped to debug a similar issue for a friend and arrived at similar conclusion.
I'm not that deep into writing C modules for python, but there has got to be a way to register C function which is being called when python interpreter quits.
Otherwise this behaviour at least has to be documented and workaround (see @mlv's comment on #19) should be provided to ignore legitimate signals- WINCH is just one of the signals whose default action is not to terminate.
I've also been bitten by this issue. My python application would randomly exit with no output or any indication why. I was finally able to consistently reproduce and it and traced it down to this issue.
My application has a number of threads so SIGCHILD would get sent by the children threads whenever they were interrupted. This seems to be another signal that by default should be ignored.
I'm really surprised that the author didn't catch this or even did it in the first place. The rest of his code works great. I wouldn't be able to do my project on the pi without since the pi only has one pwm.
I have a server that just sits quietly in a tmux window, watching pins and doing it's thing. But if I attach it and my window size changes, it dies. The reason is that source/c_pwm/pwm.c traps all signals, even those that are normally ignored:
I believe #19 and #15 are really this bug. But I put this here because the bug is more general than those issues.
The text was updated successfully, but these errors were encountered: