diff options
author | Michael Nottebrock <lofi@FreeBSD.org> | 2003-08-28 19:39:01 +0000 |
---|---|---|
committer | Michael Nottebrock <lofi@FreeBSD.org> | 2003-08-28 19:39:01 +0000 |
commit | 9683be5fc3a68dfd728c35da20a85d9de14a3323 (patch) | |
tree | c93721ec3b11bdd86c2a3dcac2a0b87fd7be1b41 /x11/kdebase3/files/patch-ksysguard-ksysguardd-FreeBSD-ProcessList.c | |
parent | - Update to version 1.4.5 (diff) |
Multiple bugfixes and enhancements for kdebase.
- Add patches for konsole which enable konsole_grantpty to
properly change permissions on ttys and fix a bug which causes
konsole to crash on recent builds of -CURRENT.
- Add a patch for configure that fixes fontconfig detection.
- Add a patch submitted by Kaarthik Sivakumar <kaarthik@comcast.net>
which fixes the bug described in PR ports/48334.
- Add a pkg-message that notifies users about the fonts this port
installs.
- Use the USE_OPENLDAP macro.
PR: ports/48334
Approved by: arved (Mentor)
Diffstat (limited to 'x11/kdebase3/files/patch-ksysguard-ksysguardd-FreeBSD-ProcessList.c')
-rw-r--r-- | x11/kdebase3/files/patch-ksysguard-ksysguardd-FreeBSD-ProcessList.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/x11/kdebase3/files/patch-ksysguard-ksysguardd-FreeBSD-ProcessList.c b/x11/kdebase3/files/patch-ksysguard-ksysguardd-FreeBSD-ProcessList.c new file mode 100644 index 000000000000..4f57a705f1f2 --- /dev/null +++ b/x11/kdebase3/files/patch-ksysguard-ksysguardd-FreeBSD-ProcessList.c @@ -0,0 +1,33 @@ +--- ksysguard/ksysguardd/FreeBSD/ProcessList.c Wed May 7 07:44:17 2003 ++++ ksysguard/ksysguardd/FreeBSD/ProcessList.c Wed Aug 27 18:51:18 2003 +@@ -168,6 +168,8 @@ + int mib[4]; + struct kinfo_proc p; + size_t len; ++ size_t buflen = 256; ++ char buf[256]; + + if ((ps = findProcessInList(pid)) == 0) + { +@@ -239,10 +241,17 @@ + #endif + + /* process command line */ +- /* the following line causes segfaults on some FreeBSD systems... why? +- strncpy(ps->cmdline, p.kp_proc.p_args->ar_args, sizeof(ps->cmdline) - 1); +- */ +- strcpy(ps->cmdline, "????"); ++ /* do a sysctl to get the command line args. */ ++ ++ mib[0] = CTL_KERN; ++ mib[1] = KERN_PROC; ++ mib[2] = KERN_PROC_ARGS; ++ mib[3] = pid; ++ ++ if ((sysctl(mib, 4, buf, &buflen, 0, 0) == -1) || !buflen) ++ strcpy(ps->cmdline, "????"); ++ else ++ strncpy(ps->cmdline, buf, buflen - 1); + + return (0); + } |