You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
602 B
20 lines
602 B
package interrupt |
|
|
|
func Restart() { |
|
// TODO: test this thing actually works! |
|
// log.D.Ln("doing windows restart") |
|
// // procAttr := new(os.ProcAttr) |
|
// // procAttr.Files = []*os.File{os.Stdin, os.Stdout, os.Stderr} |
|
// // os.StartProcess(os.Args[0], os.Args[1:], procAttr) |
|
// var s []string |
|
// // s = []string{"cmd.exe", "/C", "start"} |
|
// s = append(s, os.Args[0]) |
|
// // s = append(s, "--delaystart") |
|
// s = append(s, os.Args[1:]...) |
|
// cmd := exec.Command(s[0], s[1:]...) |
|
// log.D.Ln("windows restart done") |
|
// if err := cmd.Start(); log.Fail(err) { |
|
// } |
|
// // select{} |
|
// os.Exit(0) |
|
}
|
|
|