Skip to content

Commit e3e4e5a

Browse files
committed
add windows stub
Signed-off-by: leongross <[email protected]>
1 parent ee18198 commit e3e4e5a

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/os/exec.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ type Process struct {
5858
}
5959

6060
func StartProcess(name string, argv []string, attr *ProcAttr) (*Process, error) {
61-
return nil, &PathError{"fork/exec", name, ErrNotImplemented}
61+
return nil, &PathError{Op: "fork/exec", Path: name, Err: ErrNotImplemented}
6262
}
6363

6464
func (p *Process) Wait() (*ProcessState, error) {

src/os/file_windows.go

+8
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ func Pipe() (r *File, w *File, err error) {
5959
return
6060
}
6161

62+
func (f *unixFileHandle) Truncate(size int64) error {
63+
return ErrNotImplemented
64+
}
65+
6266
func tempDir() string {
6367
n := uint32(syscall.MAX_PATH)
6468
for {
@@ -106,6 +110,10 @@ func (f unixFileHandle) Sync() error {
106110
return ErrNotImplemented
107111
}
108112

113+
func (f *File) Truncate(size int64) error {
114+
return ErrNotImplemented
115+
}
116+
109117
// isWindowsNulName reports whether name is os.DevNull ('NUL') on Windows.
110118
// True is returned if name is 'NUL' whatever the case.
111119
func isWindowsNulName(name string) bool {

0 commit comments

Comments
 (0)