You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?