Correct the links between threads, processes, pgrps, and sessions,
authorguenther <guenther@openbsd.org>
Mon, 26 Jul 2010 01:56:27 +0000 (01:56 +0000)
committerguenther <guenther@openbsd.org>
Mon, 26 Jul 2010 01:56:27 +0000 (01:56 +0000)
commit207e4b38a785bf665de26471f4fc5fde67fa99f0
tree5b61a93df6c22438e6a0955afca220cb2f2207a0
parent269a21860d3c611c8b2db03765a702212ecab53c
Correct the links between threads, processes, pgrps, and sessions,
so that the process-level stuff is to/from struct process and not
struct proc.  This fixes a bunch of problem cases in rthreads.
Based on earlier work by blambert and myself, but mostly written
at c2k10.

Tested by many: deraadt, sthen, krw, ray, and in snapshots
44 files changed:
lib/libkvm/kvm_proc.c
lib/libkvm/kvm_proc2.c
sys/compat/common/tty_43.c
sys/compat/linux/linux_file.c
sys/compat/linux/linux_misc.c
sys/compat/svr4/svr4_fcntl.c
sys/compat/svr4/svr4_misc.c
sys/ddb/db_usrreq.c
sys/dev/usb/uhid.c
sys/dev/wscons/wseventvar.h
sys/dev/wscons/wskbd.c
sys/dev/wscons/wsmouse.c
sys/dev/wscons/wsmux.c
sys/kern/exec_elf.c
sys/kern/init_main.c
sys/kern/kern_acct.c
sys/kern/kern_descrip.c
sys/kern/kern_exec.c
sys/kern/kern_exit.c
sys/kern/kern_fork.c
sys/kern/kern_ktrace.c
sys/kern/kern_proc.c
sys/kern/kern_prot.c
sys/kern/kern_resource.c
sys/kern/kern_sig.c
sys/kern/kern_sysctl.c
sys/kern/spec_vnops.c
sys/kern/subr_prf.c
sys/kern/sys_generic.c
sys/kern/sys_process.c
sys/kern/tty.c
sys/kern/tty_pty.c
sys/kern/tty_tty.c
sys/kern/vfs_vnops.c
sys/miscfs/procfs/procfs_ctl.c
sys/miscfs/procfs/procfs_status.c
sys/miscfs/specfs/spec_vnops.c
sys/sys/proc.h
sys/sys/ptrace.h
sys/sys/resource.h
sys/sys/signalvar.h
sys/sys/sysctl.h
sys/sys/tty.h
sys/sys/uio.h