Skip to content

💥 Use non-forking subshells

AdminXVII requested to merge AdminXVII/ion:non-forking-subshells into master

Using the newly created API for default redirections, don't fork in subshells, since they are blocking anyway, and instead make them execute in foreground.


for _ in {0..1000}
    echo $(echo $(echo $(echo a)))

Executed 20x faster on my machine

Breaking change: exit in a subshell exits the foreground shell, but this arguably should not be a great annoyance

Blocked by !1104 (merged)

Edited by AdminXVII

Merge request reports