[librep] Process execution failure emits a better message. It now shows the program name and arguments.



commit 1dabd22c72130bd49d58385916aa9491fee2ec85
Author: Teika kazura <teika lavabit com>
Date:   Sat May 1 16:03:21 2010 +0900

    Process execution failure emits a better message.
    It now shows the program name and arguments.

 man/news.texi        |    1 +
 src/unix_processes.c |   11 ++++++++++-
 2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/man/news.texi b/man/news.texi
index 57713a9..ec7b03b 100644
--- a/man/news.texi
+++ b/man/news.texi
@@ -16,6 +16,7 @@ in suffix handling of @code{load} function. More details on the function
 @code{require}.
 
 @item improved specfile [Kim B. Heino]
+ item Process execution failure emits better message. [Teika Kazura]
 @end itemize
 
 @heading 0.90.5
diff --git a/src/unix_processes.c b/src/unix_processes.c
index 4c6eb18..1ecf1c8 100644
--- a/src/unix_processes.c
+++ b/src/unix_processes.c
@@ -735,7 +735,16 @@ run_process(struct Proc *pr, char **argv, char *sync_input)
 		signal (SIGPIPE, SIG_DFL);
 
 		execvp(argv[0], argv);
-		perror("child subprocess can't exec");
+		int i;
+		fprintf(stderr, "Can't exec: ");
+		for(i = 0; ; i++){
+		  if( argv[i] == NULL){
+		    break;
+		  }
+		  fprintf(stderr, "%s ", argv[i]);
+		}
+		fprintf(stderr, "\n");
+		perror(" ");
 		_exit(255);
 
 	    case -1:



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