From owner-freebsd-current@FreeBSD.ORG Tue May 20 17:00:26 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 545AF1065672 for ; Tue, 20 May 2008 17:00:26 +0000 (UTC) (envelope-from samflanker@gmail.com) Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.184]) by mx1.freebsd.org (Postfix) with ESMTP id DFCF78FC17 for ; Tue, 20 May 2008 17:00:25 +0000 (UTC) (envelope-from samflanker@gmail.com) Received: by ti-out-0910.google.com with SMTP id d27so1333327tid.3 for ; Tue, 20 May 2008 10:00:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:mime-version:content-type:content-transfer-encoding:content-disposition; bh=kDklEnhS3GtU6Ypx1349SkF2AKncY4R84fSoJj56bHg=; b=asIAY4XV2+vfSt1u0wnHm4SOnnK06ASIKItD9pzCL1cX5Sc5zAdvLF/nPRcK/jH/LR5JGUOBzgUceUlygPoc559/OqduK900fDdznh9T0c/H47Hws3WI1ShNraLpsQVJSzsuRHNhf7Aajcx4OiplsWgBdIssCVEO49PH95KABSg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:mime-version:content-type:content-transfer-encoding:content-disposition; b=NXQDfEHnG6fnklaEbLYgF0XBrSQ/vA1PG2edv3cLyFijrXAFBcBr+RnuABOVPLz4UpNfX46g1HFCpW/hfMk6noqKOPHG3ZiQ+uhog8nHcjv+2j6oxDAnmvXPsHArNCbmX60ynWPhozgTlASbwpboe5Uvtaeadp1gSC4QOJhkV/w= Received: by 10.150.148.19 with SMTP id v19mr7749225ybd.240.1211302823138; Tue, 20 May 2008 10:00:23 -0700 (PDT) Received: by 10.70.45.20 with HTTP; Tue, 20 May 2008 10:00:23 -0700 (PDT) Message-ID: Date: Tue, 20 May 2008 21:00:23 +0400 From: "Vladimir Ermakov" To: freebsd-current@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: kip.macy@gmail.com Subject: re: possible bug in /usr/include/sys/proc.h X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 May 2008 17:00:26 -0000 > td_lprof's type is going to be #ifdef _KERNEL. Why does this app need > to know about struct proc? > > -Kip Application in question is a monitoring system's agent, and it uses kvm_getprocs to obtain list of running processes. It is supposed to compile on many different FreeBSD versions. kvm_getprocs returns information in kinfo_proc structures, and kinfo_proc at least on old FreeBSD versions has member kp_proc of type struct proc. If inclusion of sys/proc.h is now prohibited, we can add additional checks to configure and add appropriate ifdefs to our code. /Vladimir Ermakov