func Exec() {
	execName := binSelf
	if execName == "" {
		selfName, err := self()
		if err != nil {
			panic(fmt.Sprintf("cannot restart: cannot find self: %v", err))
		}
		execName = selfName
	}

	if closeWatcher != nil {
		closeWatcher()
	}

	err := syscall.Exec(execName, append([]string{execName}, os.Args[1:]...), os.Environ())
	if err != nil {
		panic(fmt.Sprintf("cannot restart: %v", err))
	}
}
// Exec replaces the current process with a new copy of itself.
Exec replaces the current process with a new copy of itself.
// Exec replaces the current process with a new copy of itself .
func Exec() {
	execName := binSelf
	if execName == "" {
		selfName, err := self()
		if err != nil {
			panic(fmt.Sprintf("cannot restart: cannot find self: %v", err))
		}
		execName = selfName
	}
	if closeWatcher != nil {
		closeWatcher()
	}
	err := syscall.Exec(execName, append([]string{execName}, os.Args[1:]...), os.Environ())
	if err != nil {
		panic(fmt.Sprintf("cannot restart: %v", err))
	}
}
func Exec ( ) { execName := binSelf if execName == " " { selfName , err := self ( ) if err != nil { panic ( fmt . Sprintf ( " " , err ) ) } execName = selfName } if closeWatcher != nil { closeWatcher ( ) } err := syscall . Exec ( execName , append ( [ ] string { execName } , os . Args [ 1 : ] ... ) , os . Environ ( ) ) if err != nil { panic ( fmt . Sprintf ( " " , err ) ) } }
Exec replaces the current process with a new copy of itself.
Exec replaces the current process with a new copy of itself .