[PATCH] search path for executables

From: Greg Reagle <greg.reagle_AT_umbc.edu>
Date: Tue, 8 Dec 2015 12:30:59 -0500

---
 tlsc.c      | 4 ++--
 ucspi-tee.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tlsc.c b/tlsc.c
index be22e10..8be63cd 100644
--- a/tlsc.c
+++ b/tlsc.c
_AT_@ -212,8 +212,8 @@ main(int argc, char *argv[], char *envp[])
 
 		if (close(pi[PIPE_WRITE]) < 0) err(EXIT_FAILURE, "close");
 		if (close(po_read) < 0) err(EXIT_FAILURE, "close");
-		execve(prog, argv, environ);
-		err(EXIT_FAILURE, "execve");
+		execvpe(prog, argv, environ);
+		err(EXIT_FAILURE, "execvpe");
 	default: break;	/* parent */
 	}
 
diff --git a/ucspi-tee.c b/ucspi-tee.c
index 34905ee..62d4d28 100644
--- a/ucspi-tee.c
+++ b/ucspi-tee.c
_AT_@ -112,8 +112,8 @@ main(int argc, char *argv[], char *envp[])
 
 		if (close(pi[PIPE_WRITE]) < 0) goto err;
 		if (close(po_read) < 0) goto err;
-		execve(prog, argv, environ);
-		err(EXIT_FAILURE, "execve()");
+		execvpe(prog, argv, environ);
+		err(EXIT_FAILURE, "execvpe()");
 	default: break;
 	}
 
-- 
1.9.1
--------------010800080700000504090701--
Received on Mon Sep 17 2001 - 00:00:00 CEST

This archive was generated by hypermail 2.3.0 : Tue Dec 08 2015 - 19:00:14 CET