example_test.go 318 B

12345678910111213141516
  1. // Copyright 2018 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. package unix
  5. import (
  6. "log"
  7. "os"
  8. "syscall"
  9. )
  10. func ExampleExec() {
  11. err := syscall.Exec("/bin/ls", []string{"ls", "-al"}, os.Environ())
  12. log.Fatal(err)
  13. }