implemented event and req

This commit is contained in:
2025-09-02 20:32:53 +01:00
parent 76b251dea9
commit 51f04f5f60
104 changed files with 6368 additions and 125 deletions

View File

@@ -0,0 +1,26 @@
//go:build linux
package interrupt
import (
"lol.mleku.dev/log"
"os"
"syscall"
"github.com/kardianos/osext"
)
// Restart uses syscall.Exec to restart the process. macOS and Windows are not
// implemented, currently.
func Restart() {
log.D.Ln("restarting")
file, e := osext.Executable()
if e != nil {
log.E.Ln(e)
return
}
e = syscall.Exec(file, os.Args, os.Environ())
if e != nil {
log.F.Ln(e)
}
}