Thread (29 messages) flat view 29 messages, 5 authors, 2016-12-01

Re: What's cooking in git.git (Nov 2016, #06; Mon, 28)

From: Jeff King <hidden>
Date: 2016-11-30 23:47:01

On Wed, Nov 30, 2016 at 03:42:48PM -0800, Brandon Williams wrote:
quoted
where 20813 and 20867 are two threads of the main process. One is doing
the lstat and the other calls chdir at the same moment.
Yeah so it looks like the start_command function calls chdir.  Which
means any uses of the run-command interface are not thread safe....
That seems crazy. The chdir should be happening on the child side of the
fork (and looking at the code, it seems to be the case). And on the
Windows side, without fork, it's an option to the spawn call, which
makes sense.
For now the work around could be to just pass "-C <dir>" to the child
process instead of relying on run-command to chdir.
Yeah, that would push it after the exec. I just don't understand why
that would be necessary.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help