qpdfview doesn't catch SIGINT

Asked by Jakub Klinkovský

I noticed, that when qpdfview receives SIGINT or SIGTERM (for example on desktop session exit), it doesn't save its own session, so things like page position in tabs are lost. Is there some other mechanism to automatically save qpdfview's session? Now I have to manually click the exit button in menu and then exit desktop session.
I use Arch Linux with custom desktop environment, currently spectrwm.

Question information

Language:
English Edit question
Status:
Solved
For:
qpdfview Edit question
Assignee:
No assignee Edit question
Solved by:
Jakub Klinkovský
Solved:
Last query:
Last reply:
Revision history for this message
Adam Reichold (adamreichold) said :
#1

Hello Jakub,

Depending on your point of view this a bug or at least it is missing functionality: qpdfview does not integrate itself into Qt's session handling. (its state is saved when the main window is closed which does apparently not include SIGINT.)

I'll investigate the matter and put this on the to-do list for the next release. I'll post it here if there is any progress on the matter.

Best regards, Adam.

Revision history for this message
Adam Reichold (adamreichold) said :
#2

Ok, seems I looked in the wrong place and Qt's session management will not really help with UNIX signals. But there is a standard recipe to handle UNIX signals within the bounds of Qt. So I added handling SIGINT and SIGTERM directly in trunk revision 833. (Currently, we just close the main window on both signals.) (This can be disabled on non-POSIX platforms by the build-time option "without_signals".)

Testing this would be very much appreciated. (On Arch Linux, you could use the "qpdfview-bzr" package from the AUR.)

Regards, Adam.

Revision history for this message
Jakub Klinkovský (kuba-klinkovsky) said :
#3

Great! I've just tested it, it works fine for me...
Thanks

Revision history for this message
Adam Reichold (adamreichold) said :
#4

Nice to know that it seems to work. (Btw., I just replace the standard recipe by a shorter multiplexing implementation. Updating your package and reporting any regressions would be very helpful. Thanks.)

Revision history for this message
Jakub Klinkovský (kuba-klinkovsky) said :
#5

The new implementation works fine.