未验证 提交 642abe2a 编写于 作者: G GeminiCarrie 提交者: GitHub

Fix a bug when running on an operating system without "bash." (#29131)

* Fix a bug when running on an operating system without "bash."

* add execution condition

* for ci-coverage
上级 a71ea009
......@@ -133,7 +133,12 @@ static int shell_popen_fork_internal(const char* real_cmd, bool do_read,
}
close_open_fds_internal();
#if defined(PADDLE_WITH_MUSL)
PCHECK(execl("/bin/sh", "sh", "-c", real_cmd, NULL) >= 0);
#else
PCHECK(execl("/bin/bash", "bash", "-c", real_cmd, NULL) >= 0);
#endif
// Note: just for compilation. the child don't run this line.
_exit(0);
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册