package os
import (
- "sync/atomic"
"syscall"
"time"
)
func sigpipe() // implemented in package runtime
-func epipecheck(file *File, e error) {
- if e == syscall.EPIPE {
- if atomic.AddInt32(&file.nepipe, 1) >= 10 {
- sigpipe()
- }
- } else {
- atomic.StoreInt32(&file.nepipe, 0)
- }
-}
-
// Link creates newname as a hard link to the oldname file.
// If there is an error, it will be of type *LinkError.
func Link(oldname, newname string) error {
import (
"runtime"
+ "sync/atomic"
"syscall"
)
bufp int // location of next record in buf.
}
+func epipecheck(file *File, e error) {
+ if e == syscall.EPIPE {
+ if atomic.AddInt32(&file.nepipe, 1) >= 10 {
+ sigpipe()
+ }
+ } else {
+ atomic.StoreInt32(&file.nepipe, 0)
+ }
+}
+
// DevNull is the name of the operating system's ``null device.''
// On Unix-like systems, it is "/dev/null"; on Windows, "NUL".
const DevNull = "/dev/null"
path string
}
+func epipecheck(file *File, e error) {
+}
+
const DevNull = "NUL"
func (f *file) isdir() bool { return f != nil && f.dirinfo != nil }