From owner-freebsd-smp Wed Aug 18 15:32:12 1999 Delivered-To: freebsd-smp@freebsd.org Received: from frmug.org (frmug-gw.frmug.org [193.56.58.252]) by hub.freebsd.org (Postfix) with ESMTP id EB79E14F1F for ; Wed, 18 Aug 1999 15:32:06 -0700 (PDT) (envelope-from roberto@keltia.freenix.fr) Received: (from uucp@localhost) by frmug.org (8.9.1/frmug-2.3/nospam) with UUCP id AAA09707 for freebsd-smp@FreeBSD.ORG; Thu, 19 Aug 1999 00:32:55 +0200 (CEST) (envelope-from roberto@keltia.freenix.fr) Received: by keltia.freenix.fr (Postfix, from userid 101) id 732E388AB; Thu, 19 Aug 1999 00:28:02 +0200 (CEST) Date: Thu, 19 Aug 1999 00:28:02 +0200 From: Ollivier Robert To: freebsd-smp@FreeBSD.ORG Subject: Re: StarOffice on a SMP system.... Message-ID: <19990819002802.A87509@keltia.freenix.fr> Mail-Followup-To: freebsd-smp@FreeBSD.ORG References: <19990818131802.A40210@titan.klemm.gtn.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/0.95.5i In-Reply-To: <19990818131802.A40210@titan.klemm.gtn.com>; from Andreas Klemm on Wed, Aug 18, 1999 at 01:18:03PM +0200 X-Operating-System: FreeBSD 4.0-CURRENT/ELF ctm#5543 AMD-K6 MMX @ 200 MHz Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org According to Andreas Klemm: > O.k. this doesn't belong here, but if you have an Idea, what's > causing this, then it would be nice, if you could drop some > mail to me. You MUST have this patch applied. Marcel will probably commit before the end of the week. Index: procfs_status.c =================================================================== RCS file: /repository/src/sys/miscfs/procfs/procfs_status.c,v retrieving revision 1.12 diff -c -r1.12 procfs_status.c *** procfs_status.c 1999/01/05 03:53:06 1.12 --- procfs_status.c 1999/05/15 20:36:16 *************** *** 47,52 **** --- 47,56 ---- #include #include #include + #include + #include + #include + #include int procfs_dostatus(curp, p, pfs, uio) *************** *** 164,178 **** return (EOPNOTSUPP); /* ! * For now, this is a hack. To implement this fully would require ! * groping around in the process address space to follow argv etc. */ ! ps = psbuf; ! bcopy(p->p_comm, ps, MAXCOMLEN); ! ps[MAXCOMLEN] = '\0'; ! ps += strlen(ps); ! ! ps += sprintf(ps, "\n"); xlen = ps - psbuf; xlen -= uio->uio_offset; --- 168,207 ---- return (EOPNOTSUPP); /* ! * This is a hack: the correct behaviour is only implemented for ! * the case of the current process enquiring about its own argv ! * (due to the difficulty of accessing other processes' address space). ! * For other cases, we cop out and just return argv[0] from p->p_comm. ! * Note that if the argv is no longer available, we deliberately ! * don't fall back on p->p_comm or return an error: the authentic ! * Linux behaviour is to return zero-length in this case. */ ! if (curproc == p) { ! struct ps_strings pstr; ! int i; ! size_t bytes_left, done; ! ! error = copyin((void*)PS_STRINGS, &pstr, sizeof(pstr)); ! if (error) return (error); ! bytes_left = sizeof(psbuf); ! ps = psbuf; ! for (i = 0; bytes_left && (i < pstr.ps_nargvstr); i++) { ! error = copyinstr(pstr.ps_argvstr[i], ps, ! bytes_left, &done); ! /* If too long or malformed, just truncate */ ! if (error) { ! error = 0; ! break; ! } ! ps += done; ! bytes_left -= done; ! } ! } else { ! ps = psbuf; ! bcopy(p->p_comm, ps, MAXCOMLEN); ! ps[MAXCOMLEN] = '\0'; ! ps += strlen(ps); ! } xlen = ps - psbuf; xlen -= uio->uio_offset; -- Sascha Blank | FreeBSD - Student and System Administrator | that's where you want to go today! at the University of Trier, Germany | mailto:blank@fox.uni-trier.de | See http://www.freebsd.org for details -- Ollivier ROBERT -=- FreeBSD: The Power to Serve! -=- roberto@keltia.freenix.fr FreeBSD keltia.freenix.fr 4.0-CURRENT #73: Sat Jul 31 15:36:05 CEST 1999 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message