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