Re: [PATCH 18/19] index-helper: autorun
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Mar 16, 2016, 18:27 UTC
- Message-ID
- <alpine.DEB.2.20.1603161923380.4690@virtualbox>
- In-Reply-To
- <1458151880.9385.1.camel@twopensource.com>
Hi David,
On Wed, 16 Mar 2016, David Turner wrote:
> I don't understand what a "detached process" is on Windows (I have never > done any real Windows programming). Does that mean "call daemonize() and > it'll take care of it?" Or something else? Or should I just not worry > about it and let you take care of it?
Every process is detached by default, when created via CreateProcess(). There is no fork() followed by a daemonize(). If you want to wait for a process to finish, you have to wait for it explicitly.
But yeah, why don't you let me worry about this?
I am much more concerned about concurrent accesses and the communication between the Git processes and the index-helper. Writing to the .pid file sounds very fragile to me, in particular when multiple processes can poke the index-helper in succession and some readers are unaware that the index is being refreshed.
This is just a quick note, and I should go into more detail, also about the topic branch my colleague Jeff Hostetler and I are working on, that is similar in spirit but wants to use a home-rolled alternative to watchman. I will go into more detail, but that will have to wait for tomorrow, as I need to log off for the day.
Ciao, Dscho