The direct cause of this PR is WASI support. WASI doesn't have getpid. However, it does have getrandom, so using that is an alternative.
That being said, the discovery that icebram will produce nondeterministic result was an unexpected one for me, and relying on PID specifically seems to be the worst of both options: it breaks reproducible builds, but also it does not guarantee unique values, since PIDs can roll over and it doesn't take very long.
I would prefer to have deterministic icebram, so I went with that option in the PR.
The direct cause of this PR is WASI support. WASI doesn't have
getpid
. However, it does havegetrandom
, so using that is an alternative.That being said, the discovery that
icebram
will produce nondeterministic result was an unexpected one for me, and relying on PID specifically seems to be the worst of both options: it breaks reproducible builds, but also it does not guarantee unique values, since PIDs can roll over and it doesn't take very long.I would prefer to have deterministic
icebram
, so I went with that option in the PR.