Skip to content

Commit

Permalink
Code refactoring after #1168
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Jun 18, 2024
1 parent 72d7e8a commit db6745e
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions internal/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,7 @@ func Init() {
os.Exit(0)
}

ppid := os.Getppid()
if ppid == 1 {
daemon = false
} else {
parent, err := os.FindProcess(ppid)
if err != nil || parent.Pid < 1 {
daemon = false
}
}

if daemon {
if daemon && os.Getppid() != 1 {
if runtime.GOOS == "windows" {
fmt.Println("Daemon mode is not supported on Windows")
os.Exit(1)
Expand Down

0 comments on commit db6745e

Please sign in to comment.