sternmull · GitHub

The problem of withCreateProcess on Windows is unrelated to my changes. I opened #110 for this. The test for getPid now no longer uses withCreateProcess for this reason.

I chose Integer as return type as a lazy solution to have a type that can represent the PID on all systems (Int32 or possibly larger on POSIX, DWORD on Windows.. which is an unsigned 32bit integer). I knew it was not the optimal solution and did it anyway. I resolved that by adding a Pid type to System.Process that is an alias for the native type that represents the PID.

I saw that your tests run on msys. That explains why i had no success in plain cmd.exe. With a minor adjustment the test now passes on all systems (OSX builds are still pending... but i am confident).

Read the original on github.com ↗