sandbox

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2024 License: MPL-2.0 Imports: 19 Imported by: 0

README

The sandbox package will be compiled into a binary file,
creating an isolated, lightweight, and disposable environment
for running a program.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NSTypeItoa = map[int]string{
	unix.CLONE_NEWCGROUP: "cgroup",
	unix.CLONE_NEWIPC:    "ipc",
	unix.CLONE_NEWNS:     "mnt",
	unix.CLONE_NEWNET:    "net",
	unix.CLONE_NEWPID:    "pid",
	unix.CLONE_NEWUSER:   "user",
	unix.CLONE_NEWUTS:    "uts",
	unix.CLONE_NEWTIME:   "time",
}

Functions

func InitEntry

func InitEntry(lang, id, mntPath string, outLimit, mem, time uint32, cases []*pb_sb.Case) (
	*pb_sb.CollectOutput, error)

Entry function is the intro of sandbox program.

func LaunchEntry

func LaunchEntry() (err error)

LaunchEntry is the entry of executing compiled program.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL