home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / next / programm / 7868 < prev    next >
Encoding:
Text File  |  1992-12-22  |  1.3 KB  |  32 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!think.com!rpi!usc!news.cerf.net!logiconultra!usenet
  3. From: john@logiconultra.com (John Martyniak)
  4. Subject: Process Info
  5. Message-ID: <1992Dec21.222910.23242@logiconultra.com>
  6. Keywords: Process,system
  7. Sender: usenet@logiconultra.com
  8. Nntp-Posting-Host: 200.1.5.235
  9. Organization: Logicon_Ultrasystems
  10. Date: Mon, 21 Dec 1992 22:29:10 GMT
  11. Lines: 19
  12.  
  13.  
  14. Has anybody out there tried to get process information (pid,ppid,Start  
  15. command,start data, etc.) from system?  My first attempt was to try to  
  16. find a system call that would do the job.  The only one I found that  
  17. seemed like it would give me the info was pfind(), however, I can't get to  
  18. that extern (the compiler does not like it when you #define KERNEL).  My  
  19. second approach was to use nlist to get the process table entry location  
  20. (proc, or nproc) but neither of these exist in /mach, and there is no  
  21. documentation to support it.  In hpux, you can do an nlist for proc and  
  22. nproc, and get the offset, you can then go to that offset in /dev/kmem and  
  23. get the process table.  There is also a pstat (process status) system  
  24. call, that does essentially the same thing.  However on the NeXT I have  
  25. been unable to find such a thing.
  26.  
  27. Can anybody help?  Has anybody tried to do anything like this?
  28.  
  29. Thanx for the help.
  30.  
  31. John Martyniak
  32.