Skip to content
New issue

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

Restart process after update #41

Open
seguidor777 opened this issue Oct 11, 2018 · 3 comments
Open

Restart process after update #41

seguidor777 opened this issue Oct 11, 2018 · 3 comments

Comments

@seguidor777
Copy link

seguidor777 commented Oct 11, 2018

Hello, is this functionallity already present? I just looked into the code and found that it only replaces the current file, but does not kill that and start the new file. Do I need to make my own implementation to control the execution?

Regards
Jorge Luna

@jiguangsdf
Copy link

i want so

@tjk
Copy link

tjk commented Feb 7, 2020

Naive approach:

if err = update.Apply(bin, update.Options{}); err != nil {
    panic(err)
}
if err = syscall.Exec(binPath, os.Args, os.Environ()); err != nil {
    panic(err)
}

Edit: This should work -- I just didn't have first arg path set correctly when I first posted this.

@giter
Copy link

giter commented Jul 22, 2020

@tjk panic: not supported by windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants