mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
fix typos with misspell
pipe the source through https://github.com/client9/misspell. typos be gone! Signed-off-by: Daniel Dao <dqminh89@gmail.com>
This commit is contained in:
@@ -295,7 +295,7 @@ func (raw *cgroupData) path(subsystem string) (string, error) {
|
|||||||
|
|
||||||
// If the cgroup name/path is absolute do not look relative to the cgroup of the init process.
|
// If the cgroup name/path is absolute do not look relative to the cgroup of the init process.
|
||||||
if filepath.IsAbs(raw.innerPath) {
|
if filepath.IsAbs(raw.innerPath) {
|
||||||
// Sometimes subsystems can be mounted togethger as 'cpu,cpuacct'.
|
// Sometimes subsystems can be mounted together as 'cpu,cpuacct'.
|
||||||
return filepath.Join(raw.root, filepath.Base(mnt), raw.innerPath), nil
|
return filepath.Join(raw.root, filepath.Base(mnt), raw.innerPath), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -388,7 +388,7 @@ func joinCgroups(c *configs.Cgroup, pid int) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// systemd represents slice heirarchy using `-`, so we need to follow suit when
|
// systemd represents slice hierarchy using `-`, so we need to follow suit when
|
||||||
// generating the path of slice. Essentially, test-a-b.slice becomes
|
// generating the path of slice. Essentially, test-a-b.slice becomes
|
||||||
// test.slice/test-a.slice/test-a-b.slice.
|
// test.slice/test-a.slice/test-a-b.slice.
|
||||||
func ExpandSlice(slice string) (string, error) {
|
func ExpandSlice(slice string) (string, error) {
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ type Cgroup struct {
|
|||||||
// The path is assumed to be relative to the host system cgroup mountpoint.
|
// The path is assumed to be relative to the host system cgroup mountpoint.
|
||||||
Path string `json:"path"`
|
Path string `json:"path"`
|
||||||
|
|
||||||
// ScopePrefix decribes prefix for the scope name
|
// ScopePrefix describes prefix for the scope name
|
||||||
ScopePrefix string `json:"scope_prefix"`
|
ScopePrefix string `json:"scope_prefix"`
|
||||||
|
|
||||||
// Paths represent the absolute cgroups paths to join.
|
// Paths represent the absolute cgroups paths to join.
|
||||||
@@ -95,7 +95,7 @@ type Resources struct {
|
|||||||
// IO read rate limit per cgroup per device, bytes per second.
|
// IO read rate limit per cgroup per device, bytes per second.
|
||||||
BlkioThrottleReadBpsDevice []*ThrottleDevice `json:"blkio_throttle_read_bps_device"`
|
BlkioThrottleReadBpsDevice []*ThrottleDevice `json:"blkio_throttle_read_bps_device"`
|
||||||
|
|
||||||
// IO write rate limit per cgroup per divice, bytes per second.
|
// IO write rate limit per cgroup per device, bytes per second.
|
||||||
BlkioThrottleWriteBpsDevice []*ThrottleDevice `json:"blkio_throttle_write_bps_device"`
|
BlkioThrottleWriteBpsDevice []*ThrottleDevice `json:"blkio_throttle_write_bps_device"`
|
||||||
|
|
||||||
// IO read rate limit per cgroup per device, IO per second.
|
// IO read rate limit per cgroup per device, IO per second.
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ func newConsoleFromPath(slavePath string) *linuxConsole {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// linuxConsole is a linux psuedo TTY for use within a container.
|
// linuxConsole is a linux pseudo TTY for use within a container.
|
||||||
type linuxConsole struct {
|
type linuxConsole struct {
|
||||||
master *os.File
|
master *os.File
|
||||||
slavePath string
|
slavePath string
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ func NewConsole(uid, gid int) (Console, error) {
|
|||||||
return &windowsConsole{}, nil
|
return &windowsConsole{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// windowsConsole is a Windows psuedo TTY for use within a container.
|
// windowsConsole is a Windows pseudo TTY for use within a container.
|
||||||
type windowsConsole struct {
|
type windowsConsole struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ type BaseContainer interface {
|
|||||||
// SystemError - System error.
|
// SystemError - System error.
|
||||||
Start(process *Process) (err error)
|
Start(process *Process) (err error)
|
||||||
|
|
||||||
// Run immediatly starts the process inside the conatiner. Returns error if process
|
// Run immediately starts the process inside the conatiner. Returns error if process
|
||||||
// fails to start. It does not block waiting for the exec fifo after start returns but
|
// fails to start. It does not block waiting for the exec fifo after start returns but
|
||||||
// opens the fifo after start returns.
|
// opens the fifo after start returns.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ func (p *setnsProcess) execSetns() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// terminate sends a SIGKILL to the forked process for the setns routine then waits to
|
// terminate sends a SIGKILL to the forked process for the setns routine then waits to
|
||||||
// avoid the process becomming a zombie.
|
// avoid the process becoming a zombie.
|
||||||
func (p *setnsProcess) terminate() error {
|
func (p *setnsProcess) terminate() error {
|
||||||
if p.cmd.Process == nil {
|
if p.cmd.Process == nil {
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ func setupRootfs(config *configs.Config, console *linuxConsole, pipe io.ReadWrit
|
|||||||
return newSystemErrorWithCause(err, "reopening /dev/null inside container")
|
return newSystemErrorWithCause(err, "reopening /dev/null inside container")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// remount dev as ro if specifed
|
// remount dev as ro if specified
|
||||||
for _, m := range config.Mounts {
|
for _, m := range config.Mounts {
|
||||||
if libcontainerUtils.CleanPath(m.Destination) == "/dev" {
|
if libcontainerUtils.CleanPath(m.Destination) == "/dev" {
|
||||||
if m.Flags&syscall.MS_RDONLY != 0 {
|
if m.Flags&syscall.MS_RDONLY != 0 {
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ func (l *linuxStandardInit) Init() error {
|
|||||||
if err := pdeath.Restore(); err != nil {
|
if err := pdeath.Restore(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// compare the parent from the inital start of the init process and make sure that it did not change.
|
// compare the parent from the initial start of the init process and make sure that it did not change.
|
||||||
// if the parent changes that means it died and we were reparented to something else so we should
|
// if the parent changes that means it died and we were reparented to something else so we should
|
||||||
// just kill ourself and not cause problems for someone else.
|
// just kill ourself and not cause problems for someone else.
|
||||||
if syscall.Getppid() != l.parentPid {
|
if syscall.Getppid() != l.parentPid {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ func fatal(err error) {
|
|||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// setupSpec performs inital setup based on the cli.Context for the container
|
// setupSpec performs initial setup based on the cli.Context for the container
|
||||||
func setupSpec(context *cli.Context) (*specs.Spec, error) {
|
func setupSpec(context *cli.Context) (*specs.Spec, error) {
|
||||||
bundle := context.String("bundle")
|
bundle := context.String("bundle")
|
||||||
if bundle != "" {
|
if bundle != "" {
|
||||||
|
|||||||
Reference in New Issue
Block a user