Re: [PATCH 6/9] difftool: replace system call with Git::command_noisy
- From
Alex Riesen <raa.lkml@gmail.com>
- Date
- Mar 17, 2012, 19:54 UTC
- Message-ID
- <CALxABCaGOhsTdRRtbVDbS37FHZ32yf4URGw34P-nq-RFm5sSYA@mail.gmail.com>
- In-Reply-To
- <CAFouethChs_2ZhYDjOqRTSoDMZ60DeMkS1A=Ke4G5G_pKPKrYA@mail.gmail.com>
On Sat, Mar 17, 2012 at 15:48, Tim Henigan <tim.henigan@gmail.com> wrote:
Show 10 quoted lines
> On Sat, Mar 17, 2012 at 6:50 AM, Alex Riesen <raa.lkml@gmail.com> wrote: >> On Sat, Mar 17, 2012 at 03:48, David Aguilar <davvid@gmail.com> wrote: >>> Is this no longer a concern? Does Git.pm need a similar portability >>> caveat, or does it avoid the problem altogether since it uses fork() >>> + exec() + waitpid()? (if this is true then it implies that this >>> change is fine). > > I need to spend more time testing this. On Windows, I have tested > with msysgit but not cygwin. Was ActiveState Perl used with cygwin > git?
Yes, it is even stated in the commentary.
As far as I know, there is only one installation where a cygwin-compiled Git is used with the ActiveState Perl (mine. I believe we would have heard if there were others - it is an extremely annoying combination).
Show 7 quoted lines
>> It _might_ work. Cygwin kind of has fork(2), it even works (kind of: >> it is a *very* expensive thing to do). There are also other ifs and >> whens, but it is worth a test. It's a nice clean up to have. > > Even it fork(2) is expensive, in this case it seems reasonable. Given > the time needed to spawn the diff tool, the fork(2) time seems > negligible.
Not Cygwin's fork. They really do a deep copy of parent process.
But actually, I misunderstood. The Perl used was of ActiveState origin. So the code in question is not affected by Cygwin at all. I have no idea how usable fork(2) of ActiveState Perl is.
Even if it is bad, I won't be really affected, I very seldom use the difftool, and I believe I never used it on that particular system.
I try test the patch in the next days. I'll tell if something is completely broken.