changing cwd after process exec

Dennis G. Rears FSAC drears at ardec.arpa
Thu Apr 28 06:27:05 AEST 1988


Andrew:


->
->Hello,
->
->     Doe anyone know how I can change my cwd from within a program
->(run as a process) so when I leave that process, the change is still
->made?  I would like to be able to do it through C if possible.
->chdir(2) works to change the cwd but only within the program.  Is
->there any other way?
->
->			      A*n*d*r*e*w
->

    There is no way to do it easily.  Possible ways include
interprocess communication between parent and child, or have the
child write the new cwd to a file and have the parent read it and
chdir.  Other than that no.

dgr

--------------------------------------------------------------------------
ARPA:	drears at ardec-ac4.arpa	UUCP:  	...!uunet!ardec-ac4.arpa!drears
AT&T:	201-724-6639		Snailmail:	Box 210, Wharton, NJ 07885
Flames:	/dev/null		Reincarnation: newton!babbage!patton!drears
Work:	SMCAR-FSS-E, Dennis Rears, Bldg 94, Picatinny Ars, NJ 07806
--------------------------------------------------------------------------



More information about the Comp.unix.questions mailing list