diff --git a/cmd/restic/background.go b/cmd/restic/background.go deleted file mode 100644 index 2f115adfd..000000000 --- a/cmd/restic/background.go +++ /dev/null @@ -1,9 +0,0 @@ -// +build !linux - -package main - -// IsProcessBackground should return true if it is running in the background or false if not -func IsProcessBackground() bool { - //TODO: Check if the process are running in the background in other OS than linux - return false -} diff --git a/cmd/restic/background_linux.go b/cmd/restic/background_linux.go deleted file mode 100644 index b9a2a2f00..000000000 --- a/cmd/restic/background_linux.go +++ /dev/null @@ -1,21 +0,0 @@ -package main - -import ( - "syscall" - "unsafe" - - "github.com/restic/restic/internal/debug" -) - -// IsProcessBackground returns true if it is running in the background or false if not -func IsProcessBackground() bool { - var pid int - _, _, err := syscall.Syscall(syscall.SYS_IOCTL, uintptr(syscall.Stdin), syscall.TIOCGPGRP, uintptr(unsafe.Pointer(&pid))) - - if err != 0 { - debug.Log("Can't check if we are in the background. Using default behaviour. Error: %s\n", err.Error()) - return false - } - - return pid != syscall.Getpgrp() -}