_id stringlengths 2 7 | title stringclasses 1
value | partition stringclasses 3
values | text stringlengths 6 2.61k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
c164500 | train | // WriteCgroupProc writes the specified pid into the cgroup's cgroup.procs file | {
"resource": ""
} | ||
c164501 | train | // mount verifies that the user isn't trying to set up any mounts they don't have
// the rights to do. In addition, it makes sure that no mount has a `uid=` or
// `gid=` option that doesn't resolve to root. | {
"resource": ""
} | ||
c164502 | train | // HostUID gets the translated uid for the process on host which could be
// different when user namespaces are enabled. | {
"resource": ""
} | ||
c164503 | train | // HostGID gets the translated gid for the process on host which could be
// different when user namespaces are enabled. | {
"resource": ""
} | ||
c164504 | train | // Utility function that gets a host ID for a container ID from user namespace map
// if that ID is present in the map. | {
"resource": ""
} | ||
c164505 | train | // NsName converts the namespace type to its filename | {
"resource": ""
} | ||
c164506 | train | // IsNamespaceSupported returns whether a namespace is available or
// not | {
"resource": ""
} | ||
c164507 | train | // notifyOnOOM returns channel on which you can expect event about OOM,
// if process died without OOM this channel will be closed. | {
"resource": ""
} | ||
c164508 | train | // Gets the cgroupRoot. | {
"resource": ""
} | ||
c164509 | train | // Freeze toggles the container's freezer cgroup depending on the state
// provided | {
"resource": ""
} | ||
c164510 | train | // Filters given syscalls in a container, preventing them from being used
// Started in the container init process, and carried over to all child processes
// Setns calls, however, require a separate invocation, as they are not children
// of the init until they join the namespace | {
"resource": ""
} | ||
c164511 | train | // IsEnabled returns if the kernel has been configured to support seccomp. | {
"resource": ""
} | ||
c164512 | train | // Convert Libcontainer Action to Libseccomp ScmpAction | {
"resource": ""
} | ||
c164513 | train | // Convert Libcontainer Operator to Libseccomp ScmpCompareOp | {
"resource": ""
} | ||
c164514 | train | // Convert Libcontainer Arg to Libseccomp ScmpCondition | {
"resource": ""
} | ||
c164515 | train | // Add a rule to match a single syscall | {
"resource": ""
} | ||
c164516 | train | // NewWeightDevice returns a configured WeightDevice pointer | {
"resource": ""
} | ||
c164517 | train | // WeightString formats the struct to be writable to the cgroup specific file | {
"resource": ""
} | ||
c164518 | train | // LeafWeightString formats the struct to be writable to the cgroup specific file | {
"resource": ""
} | ||
c164519 | train | // NewThrottleDevice returns a configured ThrottleDevice pointer | {
"resource": ""
} | ||
c164520 | train | // String formats the struct to be writable to the cgroup specific file | {
"resource": ""
} | ||
c164521 | train | // CloneFlags parses the container's Namespaces options to set the correct
// flags on clone, unshare. This function returns flags only for new namespaces. | {
"resource": ""
} | ||
c164522 | train | // changeOnExec reimplements aa_change_onexec from libapparmor in Go | {
"resource": ""
} | ||
c164523 | train | // mount initializes the console inside the rootfs mounting with the specified mount label
// and applying the correct ownership of the console. | {
"resource": ""
} | ||
c164524 | train | // dupStdio opens the slavePath for the console and dups the fds to the current
// processes stdio, fd 0,1,2. | {
"resource": ""
} | ||
c164525 | train | // loadFactory returns the configured factory instance for execing containers. | {
"resource": ""
} | ||
c164526 | train | // getContainer returns the specified container instance by loading it from state
// with the default factory. | {
"resource": ""
} | ||
c164527 | train | // newProcess returns a new libcontainer Process with the arguments from the
// spec and stdio from the current process. | {
"resource": ""
} | ||
c164528 | train | // setupIO modifies the given process config according to the options. | {
"resource": ""
} | ||
c164529 | train | // Saturates negative values at zero and returns a uint64.
// Due to kernel bugs, some of the memory cgroup stats can be negative. | {
"resource": ""
} | ||
c164530 | train | // Parses a cgroup param and returns as name, value
// i.e. "io_service_bytes 1234" will return as io_service_bytes, 1234 | {
"resource": ""
} | ||
c164531 | train | // Gets a single uint64 value from the specified cgroup file. | {
"resource": ""
} | ||
c164532 | train | // Gets a string value from the specified cgroup file | {
"resource": ""
} | ||
c164533 | train | // Return the mount point path of Intel RDT "resource control" filesysem | {
"resource": ""
} | ||
c164534 | train | // Gets the root path of Intel RDT "resource control" filesystem | {
"resource": ""
} | ||
c164535 | train | // Gets a single uint64 value from the specified file. | {
"resource": ""
} | ||
c164536 | train | // Gets a string value from the specified file | {
"resource": ""
} | ||
c164537 | train | // Get the read-only L3 cache information | {
"resource": ""
} | ||
c164538 | train | // Get the read-only memory bandwidth information | {
"resource": ""
} | ||
c164539 | train | // WriteIntelRdtTasks writes the specified pid into the "tasks" file | {
"resource": ""
} | ||
c164540 | train | // Get the 'container_id' path in Intel RDT "resource control" filesystem | {
"resource": ""
} | ||
c164541 | train | // Applies Intel RDT configuration to the process with the specified pid | {
"resource": ""
} | ||
c164542 | train | // Destroys the Intel RDT 'container_id' group | {
"resource": ""
} | ||
c164543 | train | // Returns Intel RDT path to save in a state file and to be able to
// restore the object later | {
"resource": ""
} | ||
c164544 | train | // Returns statistics for Intel RDT | {
"resource": ""
} | ||
c164545 | train | // Set Intel RDT "resource control" filesystem as configured. | {
"resource": ""
} | ||
c164546 | train | // loadSpec loads the specification from the provided path. | {
"resource": ""
} | ||
c164547 | train | // execSetns runs the process that executes C code to perform the setns calls
// because setns support requires the C process to fork off a child and perform the setns
// before the go runtime boots, we wait on the process to die and receive the child's pid
// over the provided pipe. | {
"resource": ""
} | ||
c164548 | train | // terminate sends a SIGKILL to the forked process for the setns routine then waits to
// avoid the process becoming a zombie. | {
"resource": ""
} | ||
c164549 | train | // getChildPid receives the final child's pid over the provided pipe. | {
"resource": ""
} | ||
c164550 | train | // populateProcessEnvironment loads the provided environment variables into the
// current processes's environment. | {
"resource": ""
} | ||
c164551 | train | // finalizeNamespace drops the caps, sets the correct user
// and working dir, and closes any leaked file descriptors
// before executing the command inside the namespace | {
"resource": ""
} | ||
c164552 | train | // syncParentReady sends to the given pipe a JSON payload which indicates that
// the init is ready to Exec the child process. It then waits for the parent to
// indicate that it is cleared to Exec. | {
"resource": ""
} | ||
c164553 | train | // syncParentHooks sends to the given pipe a JSON payload which indicates that
// the parent should execute pre-start hooks. It then waits for the parent to
// indicate that it is cleared to resume. | {
"resource": ""
} | ||
c164554 | train | // setupUser changes the groups, gid, and uid for the user inside the container | {
"resource": ""
} | ||
c164555 | train | // fixStdioPermissions fixes the permissions of PID 1's STDIO within the container to the specified user.
// The ownership needs to match because it is created outside of the container and needs to be
// localized. | {
"resource": ""
} | ||
c164556 | train | // setupNetwork sets up and initializes any network interface inside the container. | {
"resource": ""
} | ||
c164557 | train | // signalAllProcesses freezes then iterates over all the processes inside the
// manager's cgroups sending the signal s to them.
// If s is SIGKILL then it will wait for each process to exit.
// For all other signals it will check if the process is ready to report its
// exit status and only if it is will a wait be per... | {
"resource": ""
} | ||
c164558 | train | // GetExecUserPath is a wrapper for GetExecUser. It reads data from each of the
// given file paths and uses that data as the arguments to GetExecUser. If the
// files cannot be opened for any reason, the error is ignored and a nil
// io.Reader is passed instead. | {
"resource": ""
} | ||
c164559 | train | // GetAdditionalGroupsPath is a wrapper around GetAdditionalGroups
// that opens the groupPath given and gives it as an argument to
// GetAdditionalGroups. | {
"resource": ""
} | ||
c164560 | train | // Wait waits for the process to exit.
// Wait releases any resources associated with the Process | {
"resource": ""
} | ||
c164561 | train | // ensureParent makes sure that the parent directory of current is created
// and populated with the proper cpus and mems files copied from
// it's parent. | {
"resource": ""
} | ||
c164562 | train | // copyIfNeeded copies the cpuset.cpus and cpuset.mems from the parent
// directory to the current directory if the file's contents are 0 | {
"resource": ""
} | ||
c164563 | train | // checkCriuVersion checks Criu version greater than or equal to minVersion | {
"resource": ""
} | ||
c164564 | train | // makeCriuRestoreMountpoints makes the actual mountpoints for the
// restore using CRIU. This function is inspired from the code in
// rootfs_linux.go | {
"resource": ""
} | ||
c164565 | train | // isPathInPrefixList is a small function for CRIU restore to make sure
// mountpoints, which are on a tmpfs, are not created in the roofs | {
"resource": ""
} | ||
c164566 | train | // prepareCriuRestoreMounts tries to set up the rootfs of the
// container to be restored in the same way runc does it for
// initial container creation. Even for a read-only rootfs container
// runc modifies the rootfs to add mountpoints which do not exist.
// This function also creates missing mountpoints as long as ... | {
"resource": ""
} | ||
c164567 | train | // block any external network activity | {
"resource": ""
} | ||
c164568 | train | // refreshState needs to be called to verify that the current state on the
// container is what is true. Because consumers of libcontainer can use it
// out of process we need to verify the container's status based on runtime
// information and not rely on our in process info. | {
"resource": ""
} | ||
c164569 | train | // orderNamespacePaths sorts namespace paths into a list of paths that we
// can setns in order. | {
"resource": ""
} | ||
c164570 | train | // ignoreTerminateErrors returns nil if the given err matches an error known
// to indicate that the terminate occurred successfully or err was nil, otherwise
// err is returned unaltered. | {
"resource": ""
} | ||
c164571 | train | // newSignalHandler returns a signal handler for processing SIGCHLD and SIGWINCH signals
// while still forwarding all other signals to the process.
// If notifySocket is present, use it to read systemd notifications from the container and
// forward them to notifySocketHost. | {
"resource": ""
} | ||
c164572 | train | // forward handles the main signal event loop forwarding, resizing, or reaping depending
// on the signal received. | {
"resource": ""
} | ||
c164573 | train | // reap runs wait4 in a loop until we have finished processing any existing exits
// then returns all exits to the main event loop for further processing. | {
"resource": ""
} | ||
c164574 | train | // rootfs validates if the rootfs is an absolute path and is not a symlink
// to the container's root filesystem. | {
"resource": ""
} | ||
c164575 | train | // checkHostNs checks whether network sysctl is used in host namespace. | {
"resource": ""
} | ||
c164576 | train | // writeSync is used to write to a synchronisation pipe. An error is returned
// if there was a problem writing the payload. | {
"resource": ""
} | ||
c164577 | train | // readSync is used to read from a synchronisation pipe. An error is returned
// if we got a genericError, the pipe was closed, or we got an unexpected flag. | {
"resource": ""
} | ||
c164578 | train | // parseSync runs the given callback function on each syncT received from the
// child. It will return once io.EOF is returned from the given pipe. | {
"resource": ""
} | ||
c164579 | train | // isUnitExists returns true if the error is that a systemd unit already exists. | {
"resource": ""
} | ||
c164580 | train | // Stat returns a Stat_t instance for the specified process. | {
"resource": ""
} | ||
c164581 | train | // getStrategy returns the specific network strategy for the
// provided type. | {
"resource": ""
} | ||
c164582 | train | // Returns the network statistics for the network interfaces represented by the NetworkRuntimeInfo. | {
"resource": ""
} | ||
c164583 | train | // Redis `SMEMBERS key` command output as a map | {
"resource": ""
} | ||
c164584 | train | // Redis `SRANDMEMBER key count` command. | {
"resource": ""
} | ||
c164585 | train | // Redis `ZADD key XX INCR score member` command. | {
"resource": ""
} | ||
c164586 | train | // ClientSetName assigns a name to the connection. | {
"resource": ""
} | ||
c164587 | train | // ClientGetName returns the name of the connection. | {
"resource": ""
} | ||
c164588 | train | // Err returns the last iterator error, if any. | {
"resource": ""
} | ||
c164589 | train | // Next advances the cursor and returns true if more values can be read. | {
"resource": ""
} | ||
c164590 | train | // NewFailoverClient returns a Redis client that uses Redis Sentinel
// for automatic failover. It's safe for concurrent use by multiple
// goroutines. | {
"resource": ""
} | ||
c164591 | train | // Failover forces a failover as if the master was not reachable, and without
// asking for agreement to other Sentinels. | {
"resource": ""
} | ||
c164592 | train | // FlushConfig forces Sentinel to rewrite its configuration on disk, including
// the current Sentinel state. | {
"resource": ""
} | ||
c164593 | train | // Master shows the state and info of the specified master. | {
"resource": ""
} | ||
c164594 | train | // StringToBytes converts string to byte slice. | {
"resource": ""
} | ||
c164595 | train | // WrapProcess wraps function that processes Redis commands. | {
"resource": ""
} | ||
c164596 | train | // Close closes the client, releasing any open resources.
//
// It is rare to Close a Client, as the Client is meant to be
// long-lived and shared between many goroutines. | {
"resource": ""
} | ||
c164597 | train | // NewClient returns a client to the Redis Server specified by Options. | {
"resource": ""
} | ||
c164598 | train | // Get returns existed connection from the pool or creates a new one. | {
"resource": ""
} | ||
c164599 | train | // Len returns total number of connections. | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.