Xref: utzoo comp.unix.internals:2238 comp.unix.wizards:24371 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!ogicse!usenet!prism.CS.ORST.EDU!bridej From: bridej@prism.CS.ORST.EDU (Jim Bride) Newsgroups: comp.unix.internals,comp.unix.wizards Subject: Help getting pointer to a u structure of a process Keywords: process, user structure Message-ID: <1991Mar06.203225.20019@lynx.CS.ORST.EDU> Date: 6 Mar 91 20:32:25 GMT Sender: @lynx.CS.ORST.EDU Reply-To: bridej@prism.CS.ORST.EDU (Jim Bride) Organization: Oregon State Univ. -- Computer Science Lines: 27 Nntp-Posting-Host: prism.cs.orst.edu Hi. I am working on a program which requires me to be able to access the u (user) structure of a process OTHER than the process which is currently running. After reading over several thousand lines of source code I can't find out how to get a pointer to the other process' user structure. I think it involves translating the pointer inside the proc structure (p->p_addr) that points to the PTEs for the user structure into an address (which I can then cast to a (struct user *)). My program is running as a system call and I have been able to access the proc structure for the process I need to modify (via a call to pfind()), but I need to change a few things in the user structure of the process as well. Does anyone know of a way (preferably in C, but I would be willing to resort to assembler if I have to) that I can translate the p_addr pointer to a usable address that I can use to access the u structure or another method that I can the the address of the u structure of this other process? Any help you could offer would be greatly appreciated. BTW, I am using a HP 9000 series 300 CPU running 4.3BSD Utah. Thanks! Jim ------------------------------------------------------------------------- Jim Bride - Networking | Internet: bridej@CS.ORST.EDU Computer Science Dept. | UUCP: hplabs!hp-pcd!orstcs!bridej Oregon State University| Phone: 737-6178