Bug 66 - Currently PulseView doesn't respond to Ctrl+C
Summary: Currently PulseView doesn't respond to Ctrl+C
Status: RESOLVED FIXED
Alias: None
Product: PulseView
Classification: Unclassified
Component: Other (show other bugs)
Version: unreleased development snapshot
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-13 14:22 CET by Joel Holdsworth
Modified: 2013-02-20 12:23 CET (History)
2 users (show)



Attachments
A patch to add support for SIGINT. (2.61 KB, patch)
2013-02-13 14:24 CET, Joel Holdsworth
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Holdsworth 2013-02-13 14:22:28 CET
Currently PulseView doesn't respond to Ctrl+C. Figure out how to make it do so.
Comment 1 Joel Holdsworth 2013-02-13 14:22:53 CET
"R. Diez" <rdiezmail-comparevcd@yahoo.de>
writes....

Hi Joel:


Please find attached a patch with the kind of small changes I would suggest for PulseView.

How come PulseView ends up including Python headers through sigrokdecode.h? I was hoping that, if the GUI is just using the Python decoders, they would be encapsulated so that the GUI wouldn't need to know anything about Python itself.

By the way, here is an example of how to cleanly exit on Ctrl+C (SIGINT). It uses sockets:

  http://bazaar.launchpad.net/~adamreichold/qpdfview/trunk/view/head:/sources/main.cpp
  http://bazaar.launchpad.net/~adamreichold/qpdfview/trunk/view/head:/sources/signalhandler.h
  http://bazaar.launchpad.net/~adamreichold/qpdfview/trunk/view/head:/sources/signalhandler.cpp

More info about that technique is here:
    http://doc.qt.digia.com/stable/unix-signals.html

Regards,
   rdiez
Comment 2 Joel Holdsworth 2013-02-13 14:24:18 CET
Created attachment 27 [details]
A patch to add support for SIGINT.
Comment 3 mrnuke 2013-02-18 18:40:47 CET
(In reply to comment #2)
> Created attachment 27 [details]
> A patch to add support for SIGINT.

I see nothing in attachment 27 [details] relating to sigint.

For the record, I have had a fix for this issue since the beginning of the year:
https://gitorious.org/pulseview/pulseview/commits/sigint
Comment 4 Uwe Hermann 2013-02-20 12:23:56 CET
The sigint functionality is added in 31e6731d976cb2b398c92763a9d3507437b8a826 and 9d544917dcaa047c5bf7353d89c110792bae3d84 using the code from mrnuke, thanks!

I've also merged the changes contained in the patch from R. Diez in other commits.