← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Signal handlers for SINGLE_TOP and KICAD

 

Simon,

Thanks for testing this.  It was on my list but it looks like it has to
be fixed before we can commit it.

Cheers,

Wayne

On 1/23/2017 10:09 AM, Simon Wells wrote:
> this seems broken on pcbnew when python is enabled at least on osx. getting
> 
> Air:~ simon$ /Volumes/simon/kicad-app/bin/kicad.app/Contents/MacOS/kicad
> 
> ^C^C^C^C^C^C^C^C^C^C^C^C^C^C^CError in sys.exitfunc:
> 
> Traceback (most recent call last):
> 
>   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/atexit.py",
> line 13, in _run_exitfuncs
> 
>     def _run_exitfuncs():
> 
> KeyboardInterrupt
> 
> even after i close pcbnew and open eeschema it still doesn't work
> 
> On 12 January 2017 at 13:19, John Beard <john.j.beard@xxxxxxxxx> wrote:
>> And here is the patch with the class name in capitals and a class
>> comment block. Sorry!
>>
>> On Wed, Jan 11, 2017 at 11:26 PM, John Beard <john.j.beard@xxxxxxxxx> wrote:
>>> Hi,
>>>
>>> None of the KiCad programs appear to implement any signal handlers.
>>> This means that some of them (e.g. pcbnew) don't respond to things
>>> like SIGINT generated by a Ctrl-C in the console its running from
>>> (very annoying when running up and down repeatedly), and others (e.g.
>>> eeschema) terminate immediately, rather than shutting down.
>>>
>>> The attached patch implements a graceful shutdown on SIGINT for all of
>>> the SINGLE_TOP programs as well as KICAD.
>>>
>>> I have put it in a separate class (static members because the handlers
>>> have to be that way), so that 1) the same handler can be used in both
>>> places and 2) in future if the signal handlers grow, any complexity is
>>> contained.
>>>
>>> I have tested this on Linux, and since it's using the standard C++
>>> <csignal> stuff, I assume it works (or at least compiles) on all
>>> platforms, but I can't prove it!
>>>
>>> Cheers,
>>>
>>> John
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
>>
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 


Follow ups

References