开发者

Why is closing a terminal window and opening a new one sometimes the solution?

Sometimes when I'm debugging a program that runs from the command line, a seemingly obvious change doesn't work until I close the terminal windo开发者_开发百科w, open a new one, and try again. I've had this happen on both Mac OS (i.e., bash) and Windows.

This is a last-ditch thing I do when obvious solutions fail, but I'd like to know why. Is it something about the command-line program "capturing" a snapshot of something when it's created?


Shells can hash known binaries (so they don't have to search the path for it)

When changing system wide environment variables, you need to start a new shell to get the new environment. Note that just entering a subshell doesn't work as child processes inherit their environments from their parents

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜