volta icon indicating copy to clipboard operation
volta copied to clipboard

use `exec` in unix

Open dherman opened this issue 7 years ago • 2 comments

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!)

dherman avatar Feb 10 '18 23:02 dherman

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 avatar Jan 03 '22 21:01 frangio

@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.

charlespierce avatar Jan 11 '22 05:01 charlespierce