summaryrefslogtreecommitdiff
path: root/PACE
diff options
context:
space:
mode:
authorjwh1 <jwh1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-06-29 07:40:37 +0000
committerjwh1 <jwh1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-06-29 07:40:37 +0000
commit812c7626024ebee75ed16dbf1511cb08c80cd647 (patch)
tree2866ded1da6052eed72975bbb03b2a97fe502c5b /PACE
parent8cdba80eb6a071eb01c04027fd808645914de7ea (diff)
downloadATCD-812c7626024ebee75ed16dbf1511cb08c80cd647.tar.gz
Thu Jun 29 02:38:52 2000 John Heitmann <jwh1@cs.wustl.edu>
Diffstat (limited to 'PACE')
-rw-r--r--PACE/pace/posix/unistd.c35
-rw-r--r--PACE/pace/posix/unistd.h19
2 files changed, 39 insertions, 15 deletions
diff --git a/PACE/pace/posix/unistd.c b/PACE/pace/posix/unistd.c
index f8e1e9a4676..3565c1f93a1 100644
--- a/PACE/pace/posix/unistd.c
+++ b/PACE/pace/posix/unistd.c
@@ -12,9 +12,42 @@
* Luther Baker
*
* ============================================================================= */
-
+#include <stdarg.h>
#include "pace/unistd.h"
+int
+execl (const char* path, const char* arg, ...)
+{
+ int result = 0;
+ va_list ap;
+ va_start (ap, arg);
+ result = pace_execv (path, ap);
+ va_end (ap);
+ return result;
+}
+
+int
+execle (const char* path, const char* arg, ...)
+{
+ int result = 0;
+ va_list ap;
+ va_start (ap, arg);
+ result = pace_execve (path, ap, 0);
+ va_end (ap);
+ return result;
+}
+
+int
+execlp (const char* file, const char* arg, ...)
+{
+ int result = 0;
+ va_list ap;
+ va_start (ap, arg);
+ result = pace_execvp (file, ap);
+ va_end (ap);
+ return result;
+}
+
#if !defined (PACE_HAS_INLINE)
# include "pace/posix/unistd.inl"
#endif /* ! PACE_HAS_INLINE */
diff --git a/PACE/pace/posix/unistd.h b/PACE/pace/posix/unistd.h
index 0b08f7c7add..47630b4ab4b 100644
--- a/PACE/pace/posix/unistd.h
+++ b/PACE/pace/posix/unistd.h
@@ -40,20 +40,11 @@ extern "C" {
PACE_INLINE int pace_dup2 (int fildes, int fildes2);
- #define pace_execl(X) execl X
- #define pace_execle(X) execle X
- #define pace_execlp(X) execlp X
- /* int execl (const char *path, const char *arg0, ...,
- * const char *argn, char * (*//*NULL*//*) );
- * int execle (const char *path, char *const arg0[], ...,
- * const char *argn, char * (*//*NULL*//*), char *const envp[]);
- * int execlp (const char *file, const char *arg0, ...,
- * const char *argn, char * (*//*NULL*//*));
- *
- * PLEASE PAY SPECIAL ATTENTION HERE!
- * This is a macro and requires an additional set of parenthesis
- * surrounding the arguments.
- */
+ int execl (const char* path, const char* arg, ...);
+
+ int execle (const char* path, const char* arg, ...);
+
+ int execlp (const char* file, const char* arg, ...);
PACE_INLINE int pace_execv (const char * path, char * const argv[]);