Ignore certain signals

This commit is contained in:
Brandon Skari
2016-02-24 21:48:00 -07:00
parent 58b5585dc2
commit fadb0acbc4
5 changed files with 55 additions and 15 deletions

View File

@@ -135,7 +135,14 @@ _rpitx_broadcast_fm(PyObject* self, PyObject* args) {
}
bitRate = sfInfo.samplerate;
pitx_run(MODE_RF, bitRate, frequency * 1000.0, 0.0, 0, formatRfWrapper, reset);
int skipSignals[] = {
SIGALRM,
SIGVTALRM,
SIGCHLD, // We fork whenever calling broadcast_fm
SIGWINCH, // Window resized
0
};
pitx_run(MODE_RF, bitRate, frequency * 1000.0, 0.0, 0, formatRfWrapper, reset, skipSignals);
sf_close(sndFile);
Py_RETURN_NONE;