child/child.go
func (c *Child) Stop() {
	log.Printf("[INFO] (child) stopping process")

	c.Lock()
	defer c.Unlock()

	c.stopLock.Lock()
	defer c.stopLock.Unlock()
	if c.stopped {
		log.Printf("[WARN] (child) already stopped")
		return
	}
	c.kill()
	close(c.stopCh)
	c.stopped = true
}
func (c *Child) Stop() {
	log.Printf("[INFO] (child) stopping process")

	c.Lock()
	defer c.Unlock()

	c.stopLock.Lock()
	defer c.stopLock.Unlock()
	if c.stopped {
		log.Printf("[WARN] (child) already stopped")
		return
	}
	c.kill()
	close(c.stopCh)
	c.stopped = true
}
// Stop behaves almost identical to Kill except it suppresses future processes
// from being started by this child and it prevents the killing of the child
// process from sending its value back up the exit channel. This is useful
// when doing a graceful shutdown of an application.