Show More
@@ -178,6 +178,7 b' static void lockcmdserver(struct cmdserv' | |||
|
178 | 178 | if (opts->lockfd == -1) |
|
179 | 179 | abortmsgerrno("cannot create lock file %s", |
|
180 | 180 | opts->lockfile); |
|
181 | fsetcloexec(opts->lockfd); | |
|
181 | 182 | } |
|
182 | 183 | int r = flock(opts->lockfd, LOCK_EX); |
|
183 | 184 | if (r == -1) |
@@ -309,8 +310,6 b' static hgclient_t *connectcmdserver(stru' | |||
|
309 | 310 | if (pid < 0) |
|
310 | 311 | abortmsg("failed to fork cmdserver process"); |
|
311 | 312 | if (pid == 0) { |
|
312 | /* do not leak lockfd to hg */ | |
|
313 | close(opts->lockfd); | |
|
314 | 313 | execcmdserver(opts); |
|
315 | 314 | } else { |
|
316 | 315 | hgc = retryconnectcmdserver(opts, pid); |
General Comments 0
You need to be logged in to leave comments.
Login now