std::ifstream(get_last_subsession_path_by_user_id(uid), std::ios::in) >> last_subsession;
} catch (const std::exception &ex) {
LOGE("Could not retrieve last subsession of user %s (uid %d)", username.c_str(), uid);
- return; // FIXME the file not existing is actually fine (1st run) but actual errors are probably not
+
+ /* Don't rethrow since the most common errors are fine:
+ * - name doesn't necessarily map to an existing UID,
+ * this can happen e.g. when you install debug rpm
+ * packages which leaves some build artifacts under
+ * the `abuild` folder which isn't a user on target.
+ * - at first boot, the last subsession file won't exist. */
+ return;
}
if (!subsession_exists(uid, last_subsession)) {
*
* - the plugin receives OnSubsessionX from its own events.
*
- * - if you call sessiond_internal_x_subsession from within
- * OnSubsessionX, there will be an inversion in how D-Bus
- * notifications to other processes are ordered
- *
* - sessiond assumes single-threading and doing anything in
* a separate thread is a race condition. */