[PATCH] Explain seemingly pointless use of system in difftool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Portability reasons.

Signed-off-by: Alex Riesen <raa.lkml@xxxxxxxxx>
---

Alex Riesen, Thu, Apr 23, 2009 21:08:35 +0200:
> Alex Riesen, Thu, Apr 23, 2009 20:57:32 +0200:
> > I'll add this comment regarding use of system in the case where exec
> > is right choice on all accounts and resend the patch:
> > 
> >     # ActiveState Perl for Win32 does not implement POSIX semantics of
> >     # exec* system call. It just spawns the given executable and finishes
> >     # the starting program, exiting with code 0.
> >     # system will at least catch the errors in returned by git diff,
> >     # allowing the caller of git difftool better handling of failures.
> 
> Oh... I'm too late...
> 

There.

 git-difftool.perl |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/git-difftool.perl b/git-difftool.perl
index bd828c2..9255d23 100755
--- a/git-difftool.perl
+++ b/git-difftool.perl
@@ -82,5 +82,11 @@ sub generate_command
 }
 
 setup_environment();
+
+# ActiveState Perl for Win32 does not implement POSIX semantics of
+# exec* system call. It just spawns the given executable and finishes
+# the starting program, exiting with code 0.
+# system will at least catch the errors returned by git diff,
+# allowing the caller of git difftool better handling of failures.
 my $rc = system(generate_command());
 exit($rc | ($rc >> 8));
-- 
1.6.3.rc1.74.g42ff

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]