Skip to content
Unverified Commit f83af95f authored by aszlig's avatar aszlig
Browse files

build-support: Use mktemp -d in nix-prefetch-*.



Instead of relying on $$ to not collide with an existing path.

Quoting the Bash manual about $$:

> Expands to the process ID of the shell. In a () subshell, it expands
> to the process ID of the current shell, not the subshell.

So, this is different from $BASHPID:

> Expands to the process ID of the current bash process. This differs
> from $$ under certain circumstances, such as subshells that do not
> require bash to be re-initialized.

But even $BASHPID is prone to race conditions if the process IDs wrap
around, so to be on the safe side, we're using mktemp here.

Closes #3784.

Signed-off-by: default avataraszlig <aszlig@redmoonstudios.org>
parent 39b1e2ff
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment