home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / wizards / 4761 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  1.7 KB

  1. Xref: sparky comp.unix.wizards:4761 comp.unix.questions:13541 comp.unix.programmer:5326 comp.unix.internals:1963
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!math.ksu.edu!deadend
  3. From: tar@math.ksu.edu (Tim Ramsey)
  4. Newsgroups: comp.unix.wizards,comp.unix.questions,comp.unix.programmer,comp.unix.internals
  5. Subject: Re: Changing the owner of a process
  6. Followup-To: comp.unix.internals
  7. Date: 17 Nov 1992 19:40:58 -0600
  8. Organization: Dept. of Mathematics, Kansas State University
  9. Lines: 23
  10. Message-ID: <1ec6vaINN730@hilbert.math.ksu.edu>
  11. References: <1992Oct29.162445.23551@eng.ufl.edu> <1cpjs4INNn3@early-bird.think.com> <1992Nov5.152833.27744@dale.ksc.nasa.gov> <1992Nov17.142837.21252@dale.ksc.nasa.gov> <1992Nov17.200813.18997@eng.ufl.edu>
  12. NNTP-Posting-Host: hilbert.math.ksu.edu
  13. Keywords: process owner
  14.  
  15. [ Followups set to comp.unix.internals ]
  16.  
  17. msm@eng.ufl.edu (Michael S. McLean) writes:
  18.  
  19. >There is no need to write another device driver for this.  /dev/kmem will
  20. >suffice.
  21.  
  22. You can do it by poking about in /dev/kmem, but it's not safe.  Consider:
  23.  
  24. Process A                     Process B               Process C
  25. Open /dev/kmem                <runs>
  26. Find B proc table entry       <runs>
  27. Update proc table entry       <exits>                 <starts up>
  28.  
  29. Between the time when Process A locates the proc table entry for Process B
  30. and the time that it updates the entry, Process B exits and Process C is
  31. started -- and given Process B's old table entry.  You end up updating
  32. the wrong process.
  33.  
  34. -- 
  35.     Tim Ramsey, 913.532.6750  |  I'm a sysadmin and I'm okay;
  36.     Department of Mathematics |  I work all night and I sleep all day.
  37.     Kansas State University   |
  38.