Skip to content

[Bug]: app.requestSingleInstanceLock on Windows should use MessageWindow to send back acknowledgement #34235

@rzhao271

Description

@rzhao271

app.requestSingleInstanceLock on Windows currently (Electron 18.2.3) uses a named pipe to send data (called an acknowledgement) from the first instance back to the second instance. A potential issue with named pipes is that multiple "second instances" might open at the same time, in which case the acknowledgement might not get sent back to the correct second instance in the case that the named pipe name doesn't distinguish between which instance connected. I still have to read up on #34139 and understand how exactly the pipe name is being created, though.

By using message windows, I'm thinking that we can also start up the second instance's message window ahead of time, so that the first instance can directly send back a message, without having to first go through a handshake.

CC @deepak1556

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions