Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!unido!tub!tmpmbx!trepex From: trepex@tmpmbx.UUCP (Ralf Moritz) Newsgroups: comp.unix.xenix Subject: finding user structure on SCO Xenix 386 Message-ID: <1711@tmpmbx.UUCP> Date: 18 Sep 89 11:52:24 GMT Reply-To: trepex@tmpmbx.UUCP (Ralf Moritz) Organization: netmbx GbR, Berlin, West Germany Lines: 35 Hello ! Does anyone know how to find the user structure for a running process on SCO Xenix 386 ? On SCO Xenix 286 this code worked well: proc contains the process structure if (proc.p_flag & SLOAD) { if (lseek(mem, ctob((long)proc.p_addr.p_caddr), 0) < 0L) { perror(MEM); exit(1); } if (read(mem, &user, sizeof(user)) != sizeof(user)) { perror(MEM); exit(1); } } else { if (lseek(swap, dtob((long)proc.p_addr.p_daddr), 0) < 0L) { perror(SWAP); exit(1); } if (read(swap, user.u_rsav, sizeof(user)-KSSIZE) != sizeof(user)-KSSIZE) { perror(SWAP); exit(1); } } What's the tricky part on Xenix 386 ? Ralf -- UUCP: trepex@tmpmbx (Bang: ...!uunet!unido!tmpmbx!trepex) BITNET: moritz@db0tui6 (Ralf Moritz, netmbx GbR)