Skip to content

possible race condition: Unable to open connection to server on socket #6

Description

@DavHau

In a script where I'm doing this:

S="/$TMP/async_socket"
async -s="$S" server --start -j40
$async -s="$S" cmd -- bash -c "echo hello"

... I'm sometimes running into this:

Error: Unable to open connection to server on socket
sources-combined> Caused by IO error: No such file or directory (os error 2)

My guess is, that the async --start command doesn't ensure the socket file exists when exiting and only creates it shortly after.
If cmd is issued too quickly, it will not find the socket and error out.

A sleep 1 after the start command, seems to resolve the issue.
But this should better not be necessary.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions