X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;ds=inline;f=signalhandler.cpp;h=d228718f00f8d861f8626d96e932c1b407e70fb0;hb=22dc404045aa3b519da58e02109d3ecb95682f1c;hp=4736292cb63ddee8c06791ea3584b01497e81bc8;hpb=f74015db20c1ac85df6397df7199a030e6db828f;p=pulseview.git
diff --git a/signalhandler.cpp b/signalhandler.cpp
index 4736292c..d228718f 100644
--- a/signalhandler.cpp
+++ b/signalhandler.cpp
@@ -14,15 +14,15 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * along with this program; if not, see .
*/
#include "signalhandler.hpp"
-#include
-#include
-#include
+#include
+#include
+#include
+
#include
#include
@@ -43,7 +43,8 @@ bool SignalHandler::prepare_signals()
sig_action.sa_flags = SA_RESTART;
if (sigaction(SIGINT, &sig_action, nullptr) != 0 ||
- sigaction(SIGTERM, &sig_action, nullptr) != 0) {
+ sigaction(SIGTERM, &sig_action, nullptr) != 0 ||
+ sigaction(SIGUSR1, &sig_action, nullptr) != 0) {
close(sockets_[0]);
close(sockets_[1]);
return false;
@@ -71,14 +72,16 @@ void SignalHandler::on_socket_notifier_activated()
abort();
}
- switch(sig_number)
- {
+ switch (sig_number) {
case SIGINT:
Q_EMIT int_received();
break;
case SIGTERM:
Q_EMIT term_received();
break;
+ case SIGUSR1:
+ Q_EMIT usr1_received();
+ break;
}
socket_notifier_->setEnabled(true);