提交 5ccdf4ce 编写于 作者: L Linus Torvalds

Fix the "close before dup" bug in clone-pack too

Same issue as git-fetch-pack.
上级 a87e8be2
......@@ -152,9 +152,9 @@ static int clone_pack(int fd[2], int nr_match, char **match)
if (pid < 0)
die("git-clone-pack: unable to fork off git-unpack-objects");
if (!pid) {
close(fd[1]);
dup2(fd[0], 0);
close(fd[0]);
close(fd[1]);
execlp("git-unpack-objects", "git-unpack-objects",
quiet ? "-q" : NULL, NULL);
die("git-unpack-objects exec failed");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册