func (c *Criu) Prepare() error {
	fds, err := syscall.Socketpair(syscall.AF_LOCAL, syscall.SOCK_SEQPACKET, 0)
	if err != nil {
		return err
	}
	cln := os.NewFile(uintptr(fds[0]), "criu-xprt-cln")
	syscall.CloseOnExec(fds[0])
	srv := os.NewFile(uintptr(fds[1]), "criu-xprt-srv")
	defer srv.Close()
	args := []string{"swrk", strconv.Itoa(fds[1])}
	cmd := exec.Command(c.swrkPath, args...)
	err = cmd.Start()
	if err != nil {
		cln.Close()
		return err
	}
	c.swrkCmd = cmd
	c.swrkSk = cln
	return nil
}
Prepare sets up everything for the RPC communication to CRIU
package criu
import (
	"errors"
	"fmt"
	"os"
	"os/exec"
	"strconv"
	"syscall"
	"github.com/checkpoint-restore/go-criu/v5/rpc"
	"google.golang.org/protobuf/proto"
)
type Criu struct {
	swrkCmd  *exec.Cmd
	swrkSk   *os.File
	swrkPath string
}
func MakeCriu() *Criu {
	return &Criu{
		swrkPath: "criu",
	}
}
func (c *Criu) SetCriuPath(path string) {
	c.swrkPath = path
}