<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Make it easy for applications to save state"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=82773">82773</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>systemd-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Make it easy for applications to save state
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>systemd-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>bugzilla@hadess.net
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>general
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>systemd
          </td>
        </tr></table>
      <p>
        <div>
        <pre>As discussed on IRC, it would be useful for systemd to lend a hand to
applications that want to save state in the event that they crash.

1. Application will save state every 5/10 seconds when needed to its run-time
directory
2. If the application crashes, systemd would move the application's state file
to permanent storage under the data-dir.
3. If the application is closed properly, the state file would be removed

systemd could help by providing an equivalent to ExecStopPost that would move
files with an app-specific name.

For example, totem saves a state playlist (including current playback position)
to /run/user/1000/org.gnome.Totem/org.gnome.Totem.state.xspf. If totem crashes,
then that file is moved to
~/.local/share/org.gnome.Totem/org.gnome.Totem.state.xspf so that it can
re-read it when restarted.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>