Allow engines to be started from PATH#869
Conversation
|
Ok, I see a problem. Before fastchess could execute a program if it were in your working directory like "-engine cmd=foo". Now we need to do "-engine cmd=./foo". This is what I would expect if I ran fastchess for the first time, but maybe this breaks some configs. |
|
@Disservin do you know why this test on MacOS is failing suddenly? Is posix_spawn implemented differently to posix_spawnp? What is happening? |
|
mh not too sure.. could be another flaw of the mac impl of |
|
Cutechess only starts engines from path, not from your current directory. So the "opposite" of what fastchess does. |
|
I don't know how MacOS works, but the problem only seems to be that we have a test case where a script does not contain a shebang. This script still manages to run, as if it had a shebang, on MacOS. But why worry about this? We should not author how the OS starts binaries/scripts? I think this test case should just be removed... It seems very weird that for fastchess to run on an OS, that OS must refuse to launch scripts without a shebang. |
|
Well the unit test caught a difference in behavior now, where on macOS a command works which doesn't on linux.. I assume the implementations slightly differs and that macOS uses p - execlp(), execvp(), execvpe()
And the other use
Or something like that |
|
Gonna check this myself soon |
|
Given the amount of issues I had in #872 I will probably stick with the posix spawn approach and try to add a fallback here which tries to add ./ in front if the execution failed to match the old behavior? |
No description provided.