We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When the automatic upgrade program needs to restart the application, at present I am through the "cmd" way to control, but not elegant enough
runtime.Restart()
func Restart() error { var cmd string if osutil.IsWindows() { cmd = strings.Join([]string{"taskkill /pid", u.Str(Pid), "/f", "; start", ProgramPath}, " ") } else if osutil.IsMac() { cmd = strings.Join([]string{"kill -9", u.Str(Pid), ";", ProgramPath}, " ") } else { cmd = strings.Join([]string{"kill -9", u.Str(Pid), ";", ProgramPath}, " ") } return osutil.StartExec(cmd) }
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is your feature request related to a problem? Please describe.
When the automatic upgrade program needs to restart the application, at present I am through the "cmd" way to control, but not elegant enough
Describe the solution you'd like
runtime.Restart()
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: