Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul T Darga <pdarga@umich.edu>2006-06-08 22:14:47 +0400
committerJunio C Hamano <junkio@cox.net>2006-06-08 22:57:00 +0400
commitc9bc159d7f41e2916830b05529c1ce06a81d975f (patch)
treedd3d17965ec8c97357f0a15d97455f0f4c6b30be /connect.c
parentfb6a9f93d39e4e5fdb83673a927f71a34e9fb7c0 (diff)
check for error return from fork()
Trivial fixup for fork() callsites which do not check for errors. Signed-off-by: Paul T Darga <pdarga@umich.edu> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'connect.c')
-rw-r--r--connect.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/connect.c b/connect.c
index eca94f7548..52d709e58d 100644
--- a/connect.c
+++ b/connect.c
@@ -657,6 +657,8 @@ int git_connect(int fd[2], char *url, const char *prog)
if (pipe(pipefd[0]) < 0 || pipe(pipefd[1]) < 0)
die("unable to create pipe pair for communication");
pid = fork();
+ if (pid < 0)
+ die("unable to fork");
if (!pid) {
snprintf(command, sizeof(command), "%s %s", prog,
sq_quote(path));