Skip to content

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

@DavHau

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.

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