mirror of
https://github.com/golang/sys.git
synced 2026-02-08 03:36:03 +03:00
This should call unix.Exec, not syscall.Exec. Thanks Tobias Klauser for the spot. Change-Id: Iddae390891a66652b071e05c1a5a25bbfdb19e52 Reviewed-on: https://go-review.googlesource.com/101435 Run-TryBot: Kevin Burke <kev@inburke.com> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
20 lines
400 B
Go
20 lines
400 B
Go
// Copyright 2018 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
|
|
|
package unix_test
|
|
|
|
import (
|
|
"log"
|
|
"os"
|
|
|
|
"golang.org/x/sys/unix"
|
|
)
|
|
|
|
func ExampleExec() {
|
|
err := unix.Exec("/bin/ls", []string{"ls", "-al"}, os.Environ())
|
|
log.Fatal(err)
|
|
}
|