Because when using the open function, if O_CREAT is used in the second parameter, the third parameter must be added: the initial permission given when the file was created. This depends on the version of gcc, and some versions will not report this error.
Solution:
Find the location where the open error is reported in the source code and change it to:
open (redir, O_WRONLY | O_TRUNC | O_CREAT, 0777);
The problem is solved, that is, the parameter "0777" is added.