stop

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2021 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StopCmd = &cli.Command{
	Name:  "stop",
	Usage: "stop goplz",
	Action: func(ctx *cli.Context) error {
		cfg := conf.Cfg()
		p := cfg.GetExistingProcess()
		if p == nil {
			fmt.Println("No existing goplz process found for this workspace")
			return nil
		}
		fmt.Printf("Stopping existing goplz process for workspace %s.\n", cfg.Workspace)
		if err := p.Signal(syscall.SIGQUIT); err != nil {
			fmt.Printf("Failed to send SIGQUIT to process %d.\n", p.Pid)
			return err
		}
		return nil
	},
}

StopCmd is for subcommand "stop".

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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