退出后,父进程切换目录 [英] Change directory of parent process after exit

查看:152
本文介绍了退出后,父进程切换目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:结果
  <一href=\"http://stackoverflow.com/questions/2375003/how-do-i-set-the-working-directory-of-the-parent-process\">How做我设置的父进程的工作目录?

有可能使程序退出后,目录的变化仍然存在?由于其重置为原来的目录时,程序退出。

Is possible to make the change of directory persist after program exit? Since it resets to original directory when program exits.

推荐答案

一个子进程不会影响其父的当前目录,任何比它真的会影响其父<一个href=\"http://stackoverflow.com/questions/205064/is-there-a-way-to-change-another-processs-environment-variables\">environment.如果孩子消除家长的当前目录,它使得父没有一个名为当前目录,但仅此而已。

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.

这篇关于退出后,父进程切换目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆