Close

Fix bug that occupy CPU

A project log for DJmixer

This is a project of building DJmixer using raspberry pi with four ultrasonic sensors to playback and loop the music, and change the volumn

ten000hoursTen000hours 04/14/2019 at 21:430 Comments

We come across the problem when the main program running, the switching music functions would get into dead state after being called some times.  In the first, we thought the problem could in the music playback function or in creating too many subprocess without killing them when the function jump out. After we test the main function, we find the problem actually is in the communication between parent process and subprocess. So we fix it by adding poll function which would check whether the subprocess is running or not and stop sending signal to subprocess when it actually being killed.

Discussions