go-fork
go-fork copied to clipboard
feat: add refork
Hi,
I wanted to create a small GUI for Hugo, the server can be run with the Hugo function running an uncontrollable infinite loop, so with goroutine, parent can't kill children.
I found this library which allow me kill of the forked process but doesn't allow to fork again without recreating the function (restart the server). So I create a ReFork
function using previous Function
and rewriting Function.c
with a new os.Cmd
.
Do you think there is a better way ?
Thanks