Closed ndmitchell closed 8 years ago
Is this enough?
https://github.com/jacereda/fsatrace/commit/4e771eb57d16ba21887b7c1fd7aa6d9e578a0424
If you need the full composed line passed to CreateProcessW
just tell me.
I now get:
fsatrace.exe(9988): error: forking process:
0:cmd /c echo 1
Which is still confusing since I don't know why it fails. I guess the fully composed line would be helpful here. The 0: also seems somewhat confusing.
You should probably pass:
0:cmd
1:/c
2:echo 1
Keep in mind that if we switch to _spawnvp()
or similar for process execution that's what the arguments should look like, a single argument won't work.
Ah, now I understand the 0 bit. Maybe even argv[0] = cmd ? Yes, I split up the cmd from the /c and it works.
Yep, entirely my bug, I was just having difficulty tracking back through 3 layers of cmd/Haskell/fsatrace to figure what I ended up with.
I changed the error messages to say argv[i].
What about argv[i]=... instead of argv[i]:? Since I have Windows, I get argv[i]:C:\foo, which looks a bit confusing, but not terrible if you'd prefer the : style.
Done
Awesome, thanks a lot.
I sometimes get:
It would be really useful if in those circumstances it could also print the command line used, since that can help with debugging various escaping issues (which I think is the problem I'm having here!)