Scratch loses data on catching SIGINT or SIGTERM
Bug #1115231 reported by
Sergey "Shnatsel" Davidoff
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Scratch |
Fix Released
|
Medium
|
Sergey "Shnatsel" Davidoff |
Bug Description
Scratch loses unsaved data when it receives SIGINT or SIGTERM. It should call the regular quit method instead, as SIGINT and SIGTERM are equivalent to requesting the app to quit.
Related branches
lp://staging/~shnatsel/scratch/handle-unix-signals
- elementary Apps team: Pending requested
-
Diff: 42 lines (+14/-0)2 files modifiedsrc/CMakeLists.txt (+1/-0)
src/MainWindow.vala (+13/-0)
description: | updated |
tags: | added: data-loss |
Changed in scratch: | |
status: | New → In Progress |
assignee: | nobody → Sergey "Shnatsel" Davidoff (shnatsel) |
Changed in scratch: | |
status: | New → In Progress |
assignee: | nobody → Sergey "Shnatsel" Davidoff (shnatsel) |
Changed in scratch: | |
milestone: | none → 1.2 |
importance: | Undecided → Medium |
status: | In Progress → Fix Committed |
Changed in scratch: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I've tried connecting action_quit () to those signals but I get the following error:
error: Argument 2: Cannot convert from `Scratch. MainWindow. action_ quit' to `GLib.SourceFunc'
Unix. signal_ add (Posix.SIGINT, action_quit, Priority.HIGH);
^^^^^^ ^^^^^
Trying to work that around gave me absolutely nonsential errors. I must be missing something.