summaryrefslogtreecommitdiff
path: root/data/shell-cmds
diff options
context:
space:
mode:
Diffstat (limited to 'data/shell-cmds')
-rw-r--r--data/shell-cmds/procargs.diff31
1 files changed, 31 insertions, 0 deletions
diff --git a/data/shell-cmds/procargs.diff b/data/shell-cmds/procargs.diff
new file mode 100644
index 000000000..23e2a30b0
--- /dev/null
+++ b/data/shell-cmds/procargs.diff
@@ -0,0 +1,31 @@
+diff -ru shell_cmds-116/killall/killall.c shell_cmds-116+iPhone/killall/killall.c
+--- shell_cmds-116/killall/killall.c 2005-09-28 05:44:23.000000000 +0000
++++ shell_cmds-116+iPhone/killall/killall.c 2008-06-18 08:29:07.000000000 +0000
+@@ -345,7 +345,7 @@
+ continue;
+ thispid = procs[i].kp_proc.p_pid;
+
+- int mib[3], argmax;
++ int mib[3], argmax, nargs;
+ size_t syssize;
+ char *procargs, *cp;
+
+@@ -361,7 +361,7 @@
+ continue;
+
+ mib[0] = CTL_KERN;
+- mib[1] = KERN_PROCARGS;
++ mib[1] = KERN_PROCARGS2;
+ mib[2] = thispid;
+
+ syssize = (size_t)argmax;
+@@ -370,6 +370,9 @@
+ continue;
+ }
+
++ memcpy(&nargs, procargs, sizeof(nargs));
++ cp = procargs + sizeof(nargs);
++
+ for (cp = procargs; cp < &procargs[syssize]; cp++) {
+ if (*cp == '\0') {
+ break;