From owner-freebsd-hackers Tue Jan 13 16:44:57 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA00952 for hackers-outgoing; Tue, 13 Jan 1998 16:20:57 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from tailspin.nas.nasa.gov (tailspin.nas.nasa.gov [129.99.33.42]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA01803 for ; Tue, 13 Jan 1998 16:01:32 -0800 (PST) (envelope-from proett@tailspin.nas.nasa.gov) Received: from tailspin.nas.nasa.gov (proett@localhost) by tailspin.nas.nasa.gov (8.8.7/NAS8.8.7) with ESMTP id PAA23244 for ; Tue, 13 Jan 1998 15:23:38 -0800 (PST) Message-Id: <199801132323.PAA23244@tailspin.nas.nasa.gov> X-face: @FawM/C#2aqY7IL!YtmSlwIO/RwN)vvcz2j=jD5p$:uRj#b08|nyZ?t5F]Evz*2/AqIoI\X7@O0Tqyu|+,Zh(1p/W4LR)M{{h^j?Avy/Ssw)XqkQ[T-!Q.\SYY3'idKQYlE>W'UG< Reply-To: proett@nas.nasa.gov To: freebsd-hackers@FreeBSD.ORG Subject: session id gets dropped Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 13 Jan 1998 15:23:37 -0800 From: Tom Proett Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk I am working with a batch system that uses the POSIX session to keep track of which processes comprise a "job". Under FreeBSD, I use kvm_getprocs() to get information for all the proceses then use kvm_read() to read the session structure for each process (pointed to by kp_eproc.e_sess). It turns out that the s_leader field in the session structure becomes NULL if the session leader exits. Why is there no s_sid field in the session structure to use as a session id even if the leader is gone? Even better would be for this to be replicated in the kp_eproc struct in kinfo_proc like e_ppid, e_pgid, etc. If nobody thinks it's a bad idea, I will look into making the change. Tom Proett -- proett@nas.nasa.gov NASA Ames Research Center