IIRC SCO (used to?) implemented the syscalls that merely return process
information by read-mapping the appropriate part of the ublock (think
"struct task_struct", for those unfamiliar with AT&T-derived (including BSD)
*ix, although task_struct combines both proc and ublock) within the
process's address space during process creation. Thus, getpid(), getppid(),
getpgrp(), etc. were nothing more than
return ((struct user *) PROCESS_UBLOCK_MAP_ADDR)->u_pid;
(or other structure fields as appropriate).
(This also introduced a security hole at one point, though, IIRC.)
-- brandon s. allbery [os/2][linux][solaris][japh] allbery@kf8nh.apk.net system administrator [WAY too many hats] allbery@ece.cmu.edu electrical and computer engineering KF8NH carnegie mellon university
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html