Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hidding subshells can lead to surprising behavior #43

Open
smondet opened this issue Feb 3, 2017 · 0 comments
Open

Hidding subshells can lead to surprising behavior #43

smondet opened this issue Feb 3, 2017 · 0 comments
Labels

Comments

@smondet
Copy link
Member

smondet commented Feb 3, 2017

We use subshells ($( ... ) and ( ... )) in a few places, and those behave like sub-processes wrt execution environment.

let cmd_wrapper c = (* wraps c with redirections *) in

....
cmd_wrapper "cd /tmp";
cmd_wrapper "pwd";  (* <- this is not in /tmp because the cmd_wrapper made a subshell that cancels the "cd" when finishing. *)
....

How do/we document/warn about that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant