home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / internal / 1717 < prev    next >
Encoding:
Text File  |  1992-08-20  |  1.4 KB  |  36 lines

  1. Newsgroups: comp.unix.internals
  2. Path: sparky!uunet!decwrl!pa.dec.com!decprl!decprl!boyd
  3. From: boyd@prl.dec.com (Boyd Roberts)
  4. Subject: Re: cd-ing to a dir using a process, then staying there on exit.
  5. Message-ID: <1992Aug20.190826.7119@prl.dec.com>
  6. Sender: news@prl.dec.com (USENET News System)
  7. Nntp-Posting-Host: prl313.prl.dec.com
  8. Organization: Digital Equipment Corporation - Paris Research Laboratory
  9. References: <BtA8CG.ME4@encore.com> <1992Aug20.163507.4449@gateway.novell.com>
  10. Date: Thu, 20 Aug 1992 19:08:26 GMT
  11. Lines: 23
  12.  
  13. If you're going to post any such pretense get the details right:
  14.  
  15. In article <1992Aug20.163507.4449@gateway.novell.com>, terry@thisbe.Eng.Sandy.Novell.COM (Terry Lambert) writes:
  16. > 5)    Get the locked vnode number for the process' cwd from the u struct.
  17.  
  18. The [igv]node will most probably _not_ be locked, and the u-area
  19. holds a pointer to it.
  20.  
  21. > 7)    To avoid having to reverse map the parent's cwd to a file name and
  22. >     to avoid dorking the reference count on the vnodes and locking up
  23. >     your file system, swap cwd's between the parent and the child
  24. >     process.  Do this by writing the childs vnode number into the
  25. >     parent's u struct, and the parent's into the childs.  This is the
  26. >     sneaky bit.
  27.  
  28. It's a _pointer_ and all of this will break for a variety of reasons.
  29.  
  30.  
  31. Boyd Roberts            boyd@prl.dec.com
  32.  
  33. ``When the going gets wierd, the weird turn pro...''
  34.