Am Dienstag, 18. April 2017 um 01:46:46, schrieb Tommaso Cucinotta 
<tomm...@lyx.org>
> On 18/04/2017 01:04, Kornel Benko wrote:
> >> So, I'd be in favor of using -SIGQUIT immediately on "TestEnd" in 
> >> keytest.py, falling back to "kill -9" if LyX doesn't quit within .... 0.5 
> >> secs ?
> >> (without adding the \Ax work-around in test cases, that should not bee 
> >> needed anymore).
> >
> > It may be too early. We should know first if the previously sent keystrokes 
> > ere processed.
> > But at least we could try.
> 
> right, I saw your other comment. I had somewhere in keytest.py code that 
> doesn't send a key press unless the process is sleeping :-); this was needed 
> otherwise when we have "KK: [long] sequence of keypresses", it was possible 
> to loose keys on the go; however, the lyx_sleeping() might not be too 
> precise, perhaps another way is to catch the end of LFUN processing via 
> logging ?
> 
> Thanks,
> 
>       T.

ATM I am in favour of a new function, say "lyx-exit-hard" which could be 
implemented in
src/frontends/qt4/GuiApplication.cpp, like:
        case LFUN_LYX_EXIT_HARD:
                BufferList::iterator bit = theBufferList().begin();
                BufferList::iterator const bend = theBufferList().end();
                for (; bit != bend; ++bit) {
                        Buffer * buf = *bit;
                        buf->markClean();
                }
                if (theApp())
                        theApp()->exit(0);
                else
                        exit(0);

        Kornel

P.S. I tried a new signal handler for SIGTERM (because SIGHUP is not defined on 
Windows)
but then I could not find a suitable place to check for the variable set in 
this handler.

Do you know how can we create an event from inside the handler so that this 
function will be called?

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to