Home | History | Annotate | Download | only in osutil
      1 // Copyright 2017 syzkaller project authors. All rights reserved.
      2 // Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
      3 
      4 // +build !appengine
      5 
      6 package osutil
      7 
      8 import (
      9 	"fmt"
     10 	"os"
     11 	"os/exec"
     12 	"syscall"
     13 )
     14 
     15 func HandleInterrupts(shutdown chan struct{}) {
     16 }
     17 
     18 func RemoveAll(dir string) error {
     19 	return os.RemoveAll(dir)
     20 }
     21 
     22 func prolongPipe(r, w *os.File) {
     23 }
     24 
     25 func CreateMemMappedFile(size int) (f *os.File, mem []byte, err error) {
     26 	return nil, nil, fmt.Errorf("CreateMemMappedFile is not implemented")
     27 }
     28 
     29 func CloseMemMappedFile(f *os.File, mem []byte) error {
     30 	return fmt.Errorf("CloseMemMappedFile is not implemented")
     31 }
     32 
     33 func ProcessExitStatus(ps *os.ProcessState) int {
     34 	return ps.Sys().(syscall.WaitStatus).ExitStatus()
     35 }
     36 
     37 func Sandbox(cmd *exec.Cmd, user, net bool) error {
     38 	return nil
     39 }
     40 
     41 func SandboxChown(file string) error {
     42 	return nil
     43 }
     44 
     45 func setPdeathsig(cmd *exec.Cmd) {
     46 }
     47