Closed
Description
Go programs cannot currently call syscall.Exec
safely (see #18146).
However, it is sometimes useful for a Go program to be able to execute some other command without retaining resources (such as memory) for a Go program that has no further work to do. syscall.Exec
, although error-prone in Go, is the usual way to do that on a Unix-like platform.
If we can find a way to implement portable Exec
-like functionality compatible with the Go runtime, it would be nice to have an API for that as part of the standard library (perhaps in the os/exec
package). If it cannot be done portably, perhaps we could add something to x/sys/unix
?