home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / programm / 5817 < prev    next >
Encoding:
Text File  |  1993-01-04  |  1.2 KB  |  34 lines

  1. Newsgroups: comp.unix.programmer
  2. Path: sparky!uunet!spool.mu.edu!yale.edu!ira.uka.de!smurf.sub.org!flatlin!bad
  3. From: bad@flatlin.ka.sub.org (Christoph Badura)
  4. Subject: Re: Beginner question about chdir()
  5. Organization: Guru Systems/Funware Department
  6. Date: Mon, 4 Jan 1993 11:44:13 GMT
  7. Message-ID: <C0Bv9r.EvL@flatlin.ka.sub.org>
  8. References: <1992Dec30.165109.29838@netcom.com>
  9. Keywords: chdir cd environment
  10. Lines: 22
  11.  
  12. In <1992Dec30.165109.29838@netcom.com> ian@netcom.com (James Ian McGowan) writes:
  13. >How can i use the chdir() call in a program and have it affect
  14. >the current directory of the parent process?
  15.  
  16. You can't. The parent process must execute a chdir(2) call itself.
  17.  
  18. >  Is there some
  19. >tricky way of telling the shell (csh in this case) to do a cd?
  20.  
  21. You could tell the parent to the it's own chdir() but this requires
  22. cooperation from the parent.
  23.  
  24. >If this is a FAQ, i apologise.  Pointers to sources of
  25. >information about how a child process can affect the environment
  26. >of its parent would be very welcome.
  27.  
  28. Look into the comp.unix.questions FAQ, it covers this topic at length.
  29. -- 
  30.                 Christoph Badura  ---  bad@flatlin.ka.sub.org
  31.  
  32. AIX is a better... is a better...  is a better... OpenSystem.
  33.                     IBM Rep at GUUG Symposium '92
  34.