问题
Possible Duplicate:
How do I set the working directory of the parent process?
Is possible to make the change of directory persist after program exit? Since it resets to original directory when program exits.
回答1:
A child process cannot affect its parent's current directory, any more than it can really affect its parent's environment. If the child removes the parent's current directory, it makes it so that the parent doesn't have a named current directory, but that's about all.
回答2:
No. Why do you wish that the directory changes?
来源:https://stackoverflow.com/questions/11806810/change-directory-of-parent-process-after-exit