How do you change the current working directory in a program, so that when the program is invoked from a shell, the cwd stays changed after the program exits? You can't do it with chdir(2) of course, because that only affects the current process. Nick