Skip to content

Better prevention of multiple instances #507

@nvaccessAuto

Description

@nvaccessAuto

Reported by jteh on 2009-12-10 03:02
Although we do currently try to check for an existing instance of NVDA and prevent multiple instances from starting, we still sometimes end up with multiple instances if several copies are started in very quick succession. This is because the check is based on the GUI window, which is not created instantaneously. Also, checking and creating the window is not an atomic operation. We need to find a better way of preventing multiple instances.

We still need to use the window to detect old versions and also to send WM_QUIT to terminate an existing copy. However, we can use semaphores as an extra protection mechanism. Checking for and creating a semaphore is an atomic operation; creation will fail if it already exists. As soon as creating the semaphore fails, we know there is an existing copy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions