volta
volta copied to clipboard
use `exec` in unix
For unixes at least, I suspect it would be easier to implement a correct delegation for Tool::exec
by using a Unix exec
call. But this is an area I need to dig into more. (Expert advice welcome!)
Are there specific challenges to using exec?
The process view is quite poluted because every shim spawns a child process rather than replacing itself with the tool, e.g.:
node
└─ node
@frangio At this point, I believe the main challenge to using exec
is that we support configuring telemetry that runs once the underlying task is finished, which wouldn't happen any more if we spawned the actual process using exec
. That said, with some design work, we may be able to work around that issue (spawning a separate process iff the telemetry is configured to send that info) and use exec
.
Another possible complication would be that I believe Windows has different semantics for exec
, which may require the implementation to include some extra platform-specific logic.