summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-i18n/kon2/files/kon2-0.3.9b-exec.patch')
-rw-r--r--app-i18n/kon2/files/kon2-0.3.9b-exec.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/app-i18n/kon2/files/kon2-0.3.9b-exec.patch b/app-i18n/kon2/files/kon2-0.3.9b-exec.patch
new file mode 100644
index 000000000000..9274156f8f5f
--- /dev/null
+++ b/app-i18n/kon2/files/kon2-0.3.9b-exec.patch
@@ -0,0 +1,51 @@
+--- src/child.c.org Mon Mar 9 12:00:15 1998
++++ src/child.c Thu Mar 25 05:39:42 1999
+@@ -40,10 +40,14 @@
+ #include <vc.h>
+
+ static char *startupStr, *execProg;
++static char *execProgArgs[256];
+
+-int ConfigExecProg(const char *string)
++int ConfigExecProg(const char *string, char *args[])
+ {
++ int i=0;
+ execProg = strdup(string);
++ while(args[i]) execProgArgs[i] = args[i++];
++ execProgArgs[i]=NULL;
+ return SUCCESS;
+ }
+
+@@ -133,7 +137,7 @@
+ #endif
+
+ if (execProg)
+- execlp(execProg, execProg, 0);
++ execvp(execProg, execProgArgs);
+ else {
+ if ((execProg = getenv("SHELL")) == NULL)
+ execProg = "/bin/sh";
+--- src/term.c.org Mon Mar 9 13:11:59 1998
++++ src/term.c Thu Mar 25 05:10:42 1999
+@@ -248,7 +248,7 @@
+ {
+ int i = 0;
+ const char *video = "NORMAL";
+- extern int ConfigExecProg(const char *);
++ extern int ConfigExecProg(const char *,char *const args[]);
+
+ if (argc > 0 && argv[0][0] != '-') {
+ video = argv[0];
+@@ -268,8 +268,10 @@
+ error("no value for `%s'\r\n", arg);
+ break;
+ }
+- if (!strcasecmp(arg, "e"))
+- ConfigExecProg(argv[i]);
++ if (!strcasecmp(arg, "e")){
++ ConfigExecProg(argv[i],&(argv[i]));
++ break;
++ }
+ else if (SetCapArg(arg, argv[i]) < 0)
+ warn("invalid capability `%s' ignored\r\n", arg);
+ i++;