-
Enhancement
-
Resolution: Unresolved
-
P4
-
16
When calling ExecuteWithLog with a redirection (using > or, possibly, <), the entire command needs to be executed in a subshell, that is, inside a pair of parentheses. This is the callers obligation to ensure, but we have proven multiple times that this is hard to keep in mind, and we got several cases of race conditions due to missing this.
We should change the implementation of ExecuteWithLog. Either it should always execute in a subshell (but this might prove a too high cost on Windows), or it should check if the command line contains redirection, and automatically add the subshell parentheses in that case. The latter is probably the best option.
We should change the implementation of ExecuteWithLog. Either it should always execute in a subshell (but this might prove a too high cost on Windows), or it should check if the command line contains redirection, and automatically add the subshell parentheses in that case. The latter is probably the best option.