aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/app.go
blob: 7b3d905efb39e3d41001ef3eff972468fcfdcc92 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package app

import (
	"os"
	"syscall"

	"git.thomasvoss.com/euro-cash.eu/pkg/atexit"
	. "git.thomasvoss.com/euro-cash.eu/pkg/try"
)

func Restart() {
	path := Try2(os.Executable())
	atexit.Exec()
	Try(syscall.Exec(path, append([]string{path}, os.Args[1:]...),
		os.Environ()))
}