From: Bernd Kratz (bdkratz@faui09.informatik.uni-erlangen.de)
Date: 05/05/92


From: bdkratz@faui09.informatik.uni-erlangen.de (Bernd Kratz)
Subject: Problems with cdd
Date: Tue, 5 May 1992 14:45:08 GMT

Hi,
For a few months ago, i wrote a programm for ms-dos, called cdd.
It's similar to Norton's NCD. Now i'm trying it to porting it to linux.
There's a little, ugly problem:
If i start a cdd, the program get's a new environment.
Now,if cdd changes the directory, (this is the function of
this porgram), it is in the selected directory and terminates.
But the shell is still in the old directory.
E.G:
int main()
{
        ....
        a=chdir("/usr");
        string=getcwd(NULL,MAX_PATH_NAME+2);
        printf("\n cur. wd is %s",string); /* it prints "/usr" */
        return a;
}
If you start this , normally you expecting, that your new directory
is /usr, but you are still in your old directory.

Got anybody an idea ?
Or it's possible to export the cwd. of cdd to father process ?

I'm working with GCC 1.40, Linux 0.95c+.

                                                        Thanks, Ben

EMAIL: unrzg1@daphne.rrze.uni-erlangen.de