Re: [PATCH] fetch-pack: Prepare for a side-band demultiplexer in a thread.
- From
Alex Riesen <raa.lkml@gmail.com>
- Date
- Nov 18, 2007, 01:05 UTC
- Message-ID
- <20071118010532.GC7664@steel.home>
- In-Reply-To
- <7vtznkz8nw.fsf@gitster.siamese.dyndns.org>
Junio C Hamano, Sun, Nov 18, 2007 01:42:11 +0100:
Show 12 quoted lines
> Johannes Sixt <johannes.sixt@telecom.at> writes: > > > This change again originates from the MinGW port. Since we don't > > have fork(2) on Windows, we must run the sideband demultiplexer > > in a thread. > > If the rationale was "running in a thread is more natural on the > platform", I would understand it. > > But "_must_ run because there is no fork(2)" solicits a "Huh? > How does Cygwin does it then?" from me. >
You wont believe it: they start the currently running program again and copy parents memory over into the child. Sometimes it fails. If you want something scary: http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/fork.cc?rev=1.193&content-type=text/x-cvsweb-markup&cvsroot=src