github.com/LanceLRQ/deer-common@v0.0.9-0.20210319081233-e8222ac018a8/sandbox/process/execenv/execenv_default.go (about)

     1  // Copyright 2020 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // +build !windows
     6  
     7  package execenv
     8  
     9  import (
    10  	"github.com/LanceLRQ/deer-common/sandbox/forkexec"
    11  	"syscall"
    12  )
    13  
    14  // Default will return the default environment
    15  // variables based on the process attributes
    16  // provided.
    17  //
    18  // Defaults to syscall.Environ() on all platforms
    19  // other than Windows.
    20  func Default(sys *forkexec.SysProcAttr) ([]string, error) {
    21  	return syscall.Environ(), nil
    22  }