Skip to content

Investigate if fcitx5 -r may lose unsaved data #674

Open
@wengxt

Description

@wengxt

This just come to my mind today. Right now, fcitx5 -r uses dbus name "replace" machanism to restart fcitx5.

This actually causes a race condition that:

  • when this happens, dbus module is already loaded, which means quite a few data are already loaded, including already loaded addon config etc.
  • The old instance of fcitx will only trigger "save" at this point. Which means there would be quite a few addon that may not save data already when new fcitx is initializing.

right now actually we may be blocked by XIM (xim commonly need retry upon start up) and accidentally avoided this race in real life, but we should try to do better here by introducing some mechanism for waiting the old instance to quit gracefully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions