ATT-21 single instance: a pipe instance always waits for the next launch #8
Loading…
Reference in a new issue
No description provided.
Delete branch "ATT-21-instance-race"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Work package: https://openproject.home.romaine.life/wp/ATT-21
Fixes a race in #5's Windows single instance:
a_second_launch_brings_the_first_forwardfailed about one run in five under the full workspace suite.Cause: the pipe had one instance. Between answering one launch (
DisconnectNamedPipe) and listening again (ConnectNamedPipe), a later launch'sCreateFileWfound it busy, andWaitNamedPipeWcould return at once, so ten quick retries ran out and the launch started as a second instance.What changes
FILE_FLAG_FIRST_PIPE_INSTANCE, so a second process still can't take the name). As soon as a launch connects, the server makes the next instance before reading the message, so one is always waiting.WaitNamedPipeW.Checked on upstairspc: fmt, clippy
-D warnings;rioterm's tests six times and the workspace suite three times, all passing.