-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upstream ref: 8b84c96d9da9351edb7defb76ee851f1d528ae15
- Loading branch information
Showing
15 changed files
with
292 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// +build aix solaris | ||
|
||
package backend | ||
|
||
import ( | ||
"os/exec" | ||
"syscall" | ||
|
||
"github.com/rubiojr/rapi/internal/errors" | ||
) | ||
|
||
func startForeground(cmd *exec.Cmd) (bg func() error, err error) { | ||
// run the command in it's own process group so that SIGINT | ||
// is not sent to it. | ||
cmd.SysProcAttr = &syscall.SysProcAttr{ | ||
Setpgid: true, | ||
} | ||
|
||
// start the process | ||
err = cmd.Start() | ||
if err != nil { | ||
return nil, errors.Wrap(err, "cmd.Start") | ||
} | ||
|
||
bg = func() error { return nil } | ||
return bg, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
// +build !solaris | ||
// +build !windows | ||
// +build !aix,!solaris,!windows | ||
|
||
package backend | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// +build linux solaris | ||
// +build aix linux solaris | ||
|
||
package progress | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// +build aix | ||
|
||
package restic | ||
|
||
import "syscall" | ||
|
||
func (node Node) restoreSymlinkTimestamps(path string, utimes [2]syscall.Timespec) error { | ||
return nil | ||
} | ||
|
||
func (node Node) device() int { | ||
return int(node.Device) | ||
} | ||
|
||
// AIX has a funny timespec type in syscall, with 32-bit nanoseconds. | ||
// golang.org/x/sys/unix handles this cleanly, but we're stuck with syscall | ||
// because os.Stat returns a syscall type in its os.FileInfo.Sys(). | ||
func toTimespec(t syscall.StTimespec_t) syscall.Timespec { | ||
return syscall.Timespec{Sec: t.Sec, Nsec: int64(t.Nsec)} | ||
} | ||
|
||
func (s statT) atim() syscall.Timespec { return toTimespec(s.Atim) } | ||
func (s statT) mtim() syscall.Timespec { return toTimespec(s.Mtim) } | ||
func (s statT) ctim() syscall.Timespec { return toTimespec(s.Ctim) } | ||
|
||
// Getxattr is a no-op on AIX. | ||
func Getxattr(path, name string) ([]byte, error) { | ||
return nil, nil | ||
} | ||
|
||
// Listxattr is a no-op on AIX. | ||
func Listxattr(path string) ([]string, error) { | ||
return nil, nil | ||
} | ||
|
||
// Setxattr is a no-op on AIX. | ||
func Setxattr(path, name string, data []byte) error { | ||
return nil | ||
} |
Oops, something went wrong.