summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2014-12-31 09:50:11 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2014-12-31 09:50:11 -0800
commit8f68d82c5f6cff9b22dc3335f956453679b207ad (patch)
tree67a3aaf7689471a7016450dc18c0e21e998587a3
parent032fc6a734516189e11b43e0b4680d15b62c5e66 (diff)
Remove custom version of system(3c) for Solaris
Was originally added in 1993 with the comment: make f.exec do the right thing to get working xterms under Solaris2. Doesn't seem to be needed any more on modern Solaris. As a bonus, gets rid of error found by Oracle Parfait 1.5.1 that if the execl() call fails, the function falls through and returns an uninitialized value for status and then both parent & child go back to running the same code. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--src/menus.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/menus.c b/src/menus.c
index e311454..e23b5ff 100644
--- a/src/menus.c
+++ b/src/menus.c
@@ -2337,28 +2337,6 @@ NeedToDefer(MenuRoot *root)
-#if defined(sun) && defined(SVR4)
-#include <sys/wait.h>
-
-/**
- * execute the string by /bin/sh
- * \param s the string containing the command
- */
-static int
-System (const char *s)
-{
- int pid, status;
- if ((pid = fork ()) == 0) {
- (void) setpgrp();
- execl ("/bin/sh", "sh", "-c", s, NULL);
- } else
- waitpid (pid, &status, 0);
- return status;
-}
-#define system(s) System(s)
-
-#endif
-
static void
Execute(const char *s)
{