home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / hp / 12651 < prev    next >
Encoding:
Text File  |  1992-11-08  |  1.6 KB  |  38 lines

  1. Newsgroups: comp.sys.hp
  2. Path: sparky!uunet!ukma!wupost!sdd.hp.com!scd.hp.com!hpscdm!cupnews0.cup.hp.com!pasq
  3. From: pasq@cup.hp.com (Mark Di Pasquale)
  4. Subject: Re: owner of a process
  5. Sender: news@cupnews0.cup.hp.com
  6. Message-ID: <BxBoMr.8z3@cup.hp.com>
  7. Date: Sat, 7 Nov 1992 01:40:03 GMT
  8. References: <1992Nov4.152939.14166@lmpsbbs.comm.mot.com>
  9. Organization: Hewlett-Packard
  10. X-Newsreader: TIN [version 1.1.4 PL6]
  11. Lines: 25
  12.  
  13. Steve Bennett (bennett@areaplg2.corp.mot.com) wrote:
  14. : Does anyone know how to get the owner of a process from the process id. I get the
  15. : source to the bsd source of ps but it uses kvm routines which do not appear to
  16. : exist on the HP700's What I am trying to do is write a secure version of renice
  17. : that allows a users to turn the priority of jobs they own up or down.
  18. : Unfortunately, the setpriotity syscall only allows users other that root to turn
  19. : their own priority down (lower).
  20.  
  21. If you can get the process ID, contained in the same process structure
  22. is the UID for that process.  With the UID, you can get the name of
  23. owner by using getpwuid(3C).
  24.  
  25. --
  26. Regards,
  27. Mark DiPasquale, GSY Support Planning & Training
  28.  
  29.  _______       ________________________________________________________________
  30.             /     
  31.            /                   Mark DiPasquale c/o Hewlett-Packard
  32.           ____       ___  /    19111 Pruneridge Avenue, MS 44M9
  33.          /     /    /    /     Cupertino, CA  95014
  34.       __/   __/    _____/      Email: pasq@cup.hp.com
  35.                   /            Phone: (1/408) 447-0911  FAX: (1/408) 447-0177
  36.  ___________   __/   __________________________________________________________
  37.  
  38.