Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetch-params adds an extra slash to the path of a lock file it creates #3415

Closed
charlieok opened this issue Jul 24, 2018 · 1 comment
Closed

Comments

@charlieok
Copy link
Contributor

Description

The lock function in fetch-params.sh constructs an absolute path named lockfile:

local lockfile=/tmp/fetch_params.lock

Then, it runs a command to open the lock file with file handle 200:

 eval "exec 200>/$lockfile"

This command adds an extra forward slash to the beginning of the path.

Steps to reproduce

Many (most?) platforms are forgiving about this. When running this command in an msys2 environment however, the script fails when it reaches the above line. So the issue can be reproduced by running the script from an msys2 shell.

Expected behaviour

The script should fetch the zkSNARK parameters

Actual behaviour

Here is the output I got when running fetch-params from msys2:

IEUser@MSEDGEWIN10 MINGW64 ~/Projects/zcash
$ ./zcutil/fetch-params.sh
./zcutil/fetch-params.sh: line 143: //tmp/fetch_params.lock: No such file or directory
flock: 200: Bad file descriptor
Only one instance of fetch-params.sh can be run at a time.
@bitcartel
Copy link
Contributor

Good catch.

zkbot added a commit that referenced this issue Jul 26, 2018
Remove extra slash from lockfile path

Issue: #3415

After this change I can successfully run `fetch-params` in an msys2 environment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants