summaryrefslogtreecommitdiff
path: root/connect.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-08-16 04:15:32 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-08-16 04:15:32 (GMT)
commitc9c3470aec3a1d753ac1e5f21358f6374c1add95 (patch)
tree32cfcecc5dfb4491eb054d9576f0db50fe058bbf /connect.c
parent6f002f984f1d1ddfdae990582a423dc5263697ae (diff)
parent53e1a761be8d338cd957870bc1e48a8c15d7d2c0 (diff)
downloadgit-c9c3470aec3a1d753ac1e5f21358f6374c1add95.zip
git-c9c3470aec3a1d753ac1e5f21358f6374c1add95.tar.gz
git-c9c3470aec3a1d753ac1e5f21358f6374c1add95.tar.bz2
Merge branch 'maint'
* maint: finish_connect(): thinkofix git-mv: succeed even if source is a prefix of destination Solaris does not support C99 format strings before version 10
Diffstat (limited to 'connect.c')
-rw-r--r--connect.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/connect.c b/connect.c
index 4422a0d..b9c2220 100644
--- a/connect.c
+++ b/connect.c
@@ -737,14 +737,9 @@ int git_connect(int fd[2], char *url, const char *prog)
int finish_connect(pid_t pid)
{
- int ret;
-
- for (;;) {
- ret = waitpid(pid, NULL, 0);
- if (!ret)
- break;
+ while (waitpid(pid, NULL, 0) < 0) {
if (errno != EINTR)
- break;
+ return -1;
}
- return ret;
+ return 0;
}