diff options
Diffstat (limited to 'vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/fileutils/fileutils_unix.go')
-rw-r--r-- | vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/fileutils/fileutils_unix.go | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/fileutils/fileutils_unix.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/fileutils/fileutils_unix.go deleted file mode 100644 index 7e00802..0000000 --- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/fileutils/fileutils_unix.go +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | // +build linux freebsd | ||
2 | |||
3 | package fileutils | ||
4 | |||
5 | import ( | ||
6 | "fmt" | ||
7 | "io/ioutil" | ||
8 | "os" | ||
9 | |||
10 | "github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus" | ||
11 | ) | ||
12 | |||
13 | // GetTotalUsedFds Returns the number of used File Descriptors by | ||
14 | // reading it via /proc filesystem. | ||
15 | func GetTotalUsedFds() int { | ||
16 | if fds, err := ioutil.ReadDir(fmt.Sprintf("/proc/%d/fd", os.Getpid())); err != nil { | ||
17 | logrus.Errorf("Error opening /proc/%d/fd: %s", os.Getpid(), err) | ||
18 | } else { | ||
19 | return len(fds) | ||
20 | } | ||
21 | return -1 | ||
22 | } | ||