Re: [PATCH] compat/mingw.[ch]: Change return type of exec functions to int

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

 



On Thu, Apr 05, 2012 at 07:42:26PM -0500, Jonathan Nieder wrote:

> >  	/*
> > +	 * If we are still running, we know an error occurred; let's try to
> > +	 * diagnose it more specifically.
> > +	 *
> >  	 * When a command can't be found because one of the directories
> 
> Looks fine to me. :)

Thanks. Junio, do you mind squashing this onto the tip of
jk/run-command-eaccess? Patch repeated below for your convenience.

This should fix Ramsay's problem, but I think his patch is worth
applying, anyway.

---
diff --git a/run-command.c b/run-command.c
index 7123436..e6ece79 100644
--- a/run-command.c
+++ b/run-command.c
@@ -117,10 +117,12 @@ static int exists_in_PATH(const char *file)
 
 int sane_execvp(const char *file, char * const argv[])
 {
-	if (!execvp(file, argv))
-		return 0;
+	execvp(file, argv);
 
 	/*
+	 * If we are still running, we know an error occurred; let's try to
+	 * diagnose it more specifically.
+	 *
 	 * When a command can't be found because one of the directories
 	 * listed in $PATH is unsearchable, execvp reports EACCES, but
 	 * careful usability testing (read: analysis of occasional bug

--
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]