Change directory of parent process after exit [duplicate]

故事扮演 提交于 2019-11-27 08:21:19

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!