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 window, 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?
preguntado el 27 de agosto de 11 a las 17:08
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