1/* 2 * Copyright (c) 2000 Dag-Erling Co�dan Sm�rgrav 3 * Copyright (c) 1999 Pierre Beyssac 4 * Copyright (c) 1993 Jan-Simon Pendry 5 * Copyright (c) 1993 6 * The Regents of the University of California. All rights reserved. 7 * 8 * This code is derived from software contributed to Berkeley by --- 24 unchanged lines hidden (view full) --- 33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 37 * SUCH DAMAGE. 38 * 39 * @(#)procfs_status.c 8.4 (Berkeley) 6/15/94 40 * |
41 * $FreeBSD: head/sys/compat/linprocfs/linprocfs.c 91140 2002-02-23 11:12:57Z tanimura $ |
42 */ 43 44#include <sys/param.h> 45#include <sys/queue.h> 46#include <sys/blist.h> 47#include <sys/conf.h> 48#include <sys/dkstat.h> 49#include <sys/exec.h> --- 439 unchanged lines hidden (view full) --- 489 490 fill_kinfo_proc(p, &kp); 491 sbuf_printf(sb, "%d", p->p_pid); 492#define PS_ADD(name, fmt, arg) sbuf_printf(sb, " " fmt, arg) 493 PS_ADD("comm", "(%s)", p->p_comm); 494 PS_ADD("statr", "%c", '0'); /* XXX */ 495 PROC_LOCK(p); 496 PS_ADD("ppid", "%d", p->p_pptr ? p->p_pptr->p_pid : 0); |
497 PS_ADD("pgrp", "%d", p->p_pgid); 498 PS_ADD("session", "%d", p->p_session->s_sid); |
499 PROC_UNLOCK(p); |
500 PS_ADD("tty", "%d", 0); /* XXX */ 501 PS_ADD("tpgid", "%d", 0); /* XXX */ 502 PS_ADD("flags", "%u", 0); /* XXX */ 503 PS_ADD("minflt", "%u", 0); /* XXX */ 504 PS_ADD("cminflt", "%u", 0); /* XXX */ 505 PS_ADD("majflt", "%u", 0); /* XXX */ 506 PS_ADD("cminflt", "%u", 0); /* XXX */ 507 PS_ADD("utime", "%d", 0); /* XXX */ --- 323 unchanged lines hidden --- |