3 ms·
Those examples are trying to change the directory on the shell's child process, not on the shell itself. That being said, aside from a kernel patch there is de
by Someone1234 11y ago
Those examples are trying to change the directory on the shell's child process, not on the shell itself.
That being said, aside from a kernel patch there is definitely no official way of doing it. This is the hacky way:
http://stackoverflow.com/questions/2375003/how-do-i-set-the-working-directory-of-the-parent-process http://stackoverflow.com/questions/2375003/how-do-i-set-the-...
- schoen 11y agoI meant for my examples just to illustrate that a child process can't change the working directory or environment of the parent process.