trepex@tmpmbx.UUCP (Ralf Moritz) (09/18/89)
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)