4 ms·
Forking off a subshell is very different, I would think, than forking and execing a new shell, both from a resource standpoint and an open file standpoint.
by SomeHacker44 8y ago
Forking off a subshell is very different, I would think, than forking and execing a new shell, both from a resource standpoint and an open file standpoint.
- faho 8y agoNot really from a usage perspective though, and resources often don't matter. If you're doing something like this in the background, then that usually means it takes a "long" time (or you'd just wait for it). So the overhead of starting an additional shell simply isn't important. Not that it's always irrelevant, but that's why the issues are still open.
- SomeHacker44 8y agoAgreed, resources often don't matter. But I do often do something like: ( cd somewhere ; do_something ) just so I can avoid having to do pushd somewhere ; do_something ; popd (or the equivalent).