1
0
mirror of https://github.com/golang/go synced 2024-10-04 16:31:22 -06:00
go/src/pkg/syscall
Shenghou Ma 5fbd6044bc syscall: workaround Dragonfly BSD kernel exec bug
See also CL 4259056 for FreeBSD.

Test program:
// exec.go
package main
import (
        "log"
        "os"
        "os/exec"
        "runtime"
)
func main() {
        path := runtime.GOROOT() + "/src/pkg/net/http/cgi/testdata"
        cmd := &exec.Cmd{
                Path:   "test.cgi",
                Args:   []string{path + "/test.cgi"},
                Dir:    path
                Stdout: os.Stdout}
        if err := cmd.Start(); err != nil {
                log.Fatal(err)
        }
        if err := cmd.Wait(); err != nil {
                log.Fatal(err)
        }
}

$ go run exec.go
2014/03/01 15:52:41 fork/exec test.cgi: argument list too long

LGTM=iant
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/69970044
2014-03-01 18:56:50 -05:00
..
asm_darwin_386.s syscall: Convert textflags from numbers to symbols. 2013-08-12 10:24:30 -07:00
asm_darwin_amd64.s syscall: Convert textflags from numbers to symbols. 2013-08-12 10:24:30 -07:00
asm_dragonfly_386.s runtime, syscall: add support for dragonfly/386 2013-08-31 09:32:07 -07:00
asm_dragonfly_amd64.s syscall: dragonfly/amd64 support 2013-08-24 01:51:25 +10:00
asm_freebsd_386.s syscall: Convert textflags from numbers to symbols. 2013-08-12 10:24:30 -07:00
asm_freebsd_amd64.s runtime, syscall: work around FreeBSD/amd64 kernel bug 2013-09-16 14:04:32 -04:00
asm_freebsd_arm.s syscall: fix system calls with misaligned arguments on freebsd/arm 2014-02-14 12:22:13 +09:00
asm_linux_386.s syscall: Convert textflags from numbers to symbols. 2013-08-12 10:24:30 -07:00
asm_linux_amd64.s syscall: Convert textflags from numbers to symbols. 2013-08-12 10:24:30 -07:00
asm_linux_arm.s syscall: Convert textflags from numbers to symbols. 2013-08-12 10:24:30 -07:00
asm_nacl_386.s all: merge NaCl branch (part 1) 2014-02-25 09:47:42 -05:00
asm_nacl_amd64p32.s all: merge NaCl branch (part 1) 2014-02-25 09:47:42 -05:00
asm_netbsd_386.s syscall: Convert textflags from numbers to symbols. 2013-08-12 10:24:30 -07:00
asm_netbsd_amd64.s syscall: Convert textflags from numbers to symbols. 2013-08-12 10:24:30 -07:00
asm_netbsd_arm.s syscall: Convert textflags from numbers to symbols. 2013-08-12 10:24:30 -07:00
asm_openbsd_386.s syscall: Convert textflags from numbers to symbols. 2013-08-12 10:24:30 -07:00
asm_openbsd_amd64.s syscall: Convert textflags from numbers to symbols. 2013-08-12 10:24:30 -07:00
asm_plan9_386.s syscall: Convert textflags from numbers to symbols. 2013-08-12 10:24:30 -07:00
asm_plan9_amd64.s syscall: Convert textflags from numbers to symbols. 2013-08-12 10:24:30 -07:00
asm_solaris_amd64.s syscall: add support for GOOS=solaris 2014-02-25 21:12:10 +11:00
asm_windows_386.s
asm_windows_amd64.s
bpf_bsd.go syscall: dragonfly/amd64 support 2013-08-24 01:51:25 +10:00
creds_test.go syscall: fix creds_test to reliably close os.File 2012-10-26 10:31:03 -07:00
dir_plan9.go syscall: disallow slashes in file names on Plan 9 2013-12-19 00:58:23 +01:00
dll_windows.go undo CL 45930043 / c22889382a17 2014-01-17 16:58:14 -05:00
env_plan9.go syscall: Plan 9: keep a consistent environment array 2013-02-28 06:39:02 +01:00
env_unix.go all: merge NaCl branch (part 1) 2014-02-25 09:47:42 -05:00
env_windows.go syscall: handle empty environment variable values properly on windows 2013-06-27 10:11:30 +10:00
exec_bsd.go syscall: dragonfly/amd64 support 2013-08-24 01:51:25 +10:00
exec_linux.go syscall: use unsafe.Pointer in BSD kevent 2014-01-22 10:35:41 -08:00
exec_plan9.go syscall: terminate error string in exec package on Plan 9 2014-02-19 17:17:36 -08:00
exec_solaris.go syscall: add support for GOOS=solaris 2014-02-25 21:12:10 +11:00
exec_unix.go syscall: workaround Dragonfly BSD kernel exec bug 2014-03-01 18:56:50 -05:00
exec_windows.go
fd_nacl.go all: merge NaCl branch (part 1) 2014-02-25 09:47:42 -05:00
flock_linux_32bit.go syscall: add Flock_t.Lock method 2014-01-21 14:52:44 -08:00
flock.go syscall: rename method Flock_t.Lock to func FcntlFlock 2014-01-21 16:27:39 -08:00
fs_nacl.go all: merge NaCl branch (part 1) 2014-02-25 09:47:42 -05:00
lsf_linux.go syscall: use unsafe.Pointer instead of uintptr in net syscalls 2014-01-21 18:54:49 -08:00
mkall.sh all: merge NaCl branch (part 1) 2014-02-25 09:47:42 -05:00
mkerrors_windows.sh
mkerrors.sh syscall: add support for GOOS=solaris 2014-02-25 21:12:10 +11:00
mksyscall_solaris.pl syscall: add support for GOOS=solaris 2014-02-25 21:12:10 +11:00
mksyscall_windows.pl syscall: prefer PATH environment variable in bootstrap scripts 2013-05-20 23:18:52 +09:00
mksyscall.pl all: merge NaCl branch (part 1) 2014-02-25 09:47:42 -05:00
mksysctl_openbsd.pl syscall: prefer PATH environment variable in bootstrap scripts 2013-05-20 23:18:52 +09:00
mksysnum_darwin.pl syscall: prefer PATH environment variable in bootstrap scripts 2013-05-20 23:18:52 +09:00
mksysnum_dragonfly.pl syscall: dragonfly/amd64 support 2013-08-24 01:51:25 +10:00
mksysnum_freebsd.pl syscall: prefer PATH environment variable in bootstrap scripts 2013-05-20 23:18:52 +09:00
mksysnum_linux.pl syscall: prefer PATH environment variable in bootstrap scripts 2013-05-20 23:18:52 +09:00
mksysnum_netbsd.pl syscall: prefer PATH environment variable in bootstrap scripts 2013-05-20 23:18:52 +09:00
mksysnum_openbsd.pl syscall: prefer PATH environment variable in bootstrap scripts 2013-05-20 23:18:52 +09:00
mksysnum_plan9.sh
mmap_unix_test.go syscall: fix solaris build 2014-02-26 07:56:41 +11:00
net_nacl.go all: nacl import round 2 2014-02-25 17:00:08 -05:00
netlink_linux.go syscall: simplify netlink sockets 2013-01-14 19:29:03 +09:00
race0.go runtime/race: tell race detector what memory Read/Write syscalls touch 2013-06-10 22:40:35 +04:00
race.go runtime/race: tell race detector what memory Read/Write syscalls touch 2013-06-10 22:40:35 +04:00
route_bsd.go syscall: skip routing messages with mismatched version 2013-12-11 00:03:46 +11:00
route_darwin.go syscall: add network interface announce support on BSD variants 2013-02-24 12:36:44 +09:00
route_dragonfly.go syscall: dragonfly/amd64 support 2013-08-24 01:51:25 +10:00
route_freebsd.go syscall: add network interface announce support on BSD variants 2013-02-24 12:36:44 +09:00
route_netbsd.go syscall: add network interface announce support on BSD variants 2013-02-24 12:36:44 +09:00
route_openbsd.go syscall: add network interface announce support on BSD variants 2013-02-24 12:36:44 +09:00
security_windows.go os/user: faster user lookup on Windows 2013-05-15 13:24:54 +10:00
so_solaris.go syscall: add support for GOOS=solaris 2014-02-25 21:12:10 +11:00
sockcmsg_linux.go syscall: simplify socket control messages 2013-01-15 08:52:22 +09:00
sockcmsg_unix.go syscall: add support for GOOS=solaris 2014-02-25 21:12:10 +11:00
srpc_nacl.go all: merge NaCl branch (part 1) 2014-02-25 09:47:42 -05:00
str.go
syscall_bsd.go syscall: use unsafe.Pointer in BSD kevent 2014-01-22 10:35:41 -08:00
syscall_darwin_386.go syscall: implement Sendfile for Darwin. 2013-07-12 04:34:54 +08:00
syscall_darwin_amd64.go syscall: implement Sendfile for Darwin. 2013-07-12 04:34:54 +08:00
syscall_darwin.go syscall: add mlock, munlock, mlockall, munlockall and mprotect to OSX 2014-02-27 10:13:41 -08:00
syscall_dragonfly_386.go runtime, syscall: add support for dragonfly/386 2013-08-31 09:32:07 -07:00
syscall_dragonfly_amd64.go syscall: dragonfly/amd64 support 2013-08-24 01:51:25 +10:00
syscall_dragonfly.go syscall: dragonfly/amd64 support 2013-08-24 01:51:25 +10:00
syscall_freebsd_386.go syscalls: annotate Sendfile() for race detector 2012-10-29 23:15:06 +04:00
syscall_freebsd_amd64.go syscalls: annotate Sendfile() for race detector 2012-10-29 23:15:06 +04:00
syscall_freebsd_arm.go syscalls: annotate Sendfile() for race detector 2012-10-29 23:15:06 +04:00
syscall_freebsd.go syscall: use unsafe.Pointer instead of uintptr in net syscalls 2014-01-21 18:54:49 -08:00
syscall_linux_386.go syscall: use unsafe.Pointer instead of uintptr in net syscalls 2014-01-21 18:54:49 -08:00
syscall_linux_amd64.go syscall: use unsafe.Pointer instead of uintptr in net syscalls 2014-01-21 18:54:49 -08:00
syscall_linux_arm.go syscall: use unsafe.Pointer instead of uintptr in net syscalls 2014-01-21 18:54:49 -08:00
syscall_linux.go syscall: add some paranoia in Linux's Accept4 2014-02-27 14:16:47 -08:00
syscall_nacl_386.go all: merge NaCl branch (part 1) 2014-02-25 09:47:42 -05:00
syscall_nacl_amd64p32.go all: merge NaCl branch (part 1) 2014-02-25 09:47:42 -05:00
syscall_nacl.go all: merge NaCl branch (part 1) 2014-02-25 09:47:42 -05:00
syscall_netbsd_386.go
syscall_netbsd_amd64.go
syscall_netbsd_arm.go syscall: NetBSD/ARM support 2013-02-13 01:03:25 +08:00
syscall_netbsd.go syscall: fix prototype of Fchflags (API change) 2013-05-07 05:20:00 +08:00
syscall_no_getwd.go syscall: dragonfly/amd64 support 2013-08-24 01:51:25 +10:00
syscall_openbsd_386.go runtime, syscall: update for openbsd system ABI break 2014-01-11 19:00:32 +11:00
syscall_openbsd_amd64.go runtime, syscall: update for openbsd system ABI break 2014-01-11 19:00:32 +11:00
syscall_openbsd.go runtime, syscall: update for openbsd system ABI break 2014-01-11 19:00:32 +11:00
syscall_plan9_386.go syscall, runtime: Plan 9: use nanotime syscall on amd64 2013-02-26 01:56:08 +01:00
syscall_plan9_amd64.go syscall, runtime: Plan 9: use nanotime syscall on amd64 2013-02-26 01:56:08 +01:00
syscall_plan9.go undo CL 45930043 / c22889382a17 2014-01-17 16:58:14 -05:00
syscall_solaris_amd64.go syscall: add support for GOOS=solaris 2014-02-25 21:12:10 +11:00
syscall_solaris.go syscall: add support for GOOS=solaris 2014-02-25 21:12:10 +11:00
syscall_test.go syscall: handle empty environment variable values properly on windows 2013-06-27 10:11:30 +10:00
syscall_unix_test.go syscall: fix solaris build 2014-02-26 07:56:41 +11:00
syscall_unix.go syscall: add support for GOOS=solaris 2014-02-25 21:12:10 +11:00
syscall_windows_386.go
syscall_windows_amd64.go
syscall_windows_test.go
syscall_windows.go syscall: add NewCallbackCDecl again 2013-12-19 14:38:50 +11:00
syscall.go syscall: document that documentation is platform specific 2012-12-17 22:50:00 +08:00
tables_nacl.go all: merge NaCl branch (part 1) 2014-02-25 09:47:42 -05:00
time_nacl_386.s all: merge NaCl branch (part 1) 2014-02-25 09:47:42 -05:00
time_nacl_amd64p32.s all: merge NaCl branch (part 1) 2014-02-25 09:47:42 -05:00
types_darwin.go syscall: add IPv6 socket options for Unix variants 2013-05-23 16:22:05 +09:00
types_dragonfly.go syscall: add syscall.Termios on dragonfly, openbsd 2014-01-22 10:39:10 -08:00
types_freebsd.go syscall: add syscall.Termios on freebsd/{386,amd64} 2014-01-13 13:57:38 -08:00
types_linux.go syscall: add Flock_t on Linux 2014-01-16 14:08:32 -08:00
types_netbsd.go syscall: add syscall.Termios on netbsd 2014-01-19 09:57:02 -08:00
types_openbsd.go syscall: add syscall.Termios on dragonfly, openbsd 2014-01-22 10:39:10 -08:00
types_plan9.c
types_solaris.go syscall: add support for GOOS=solaris 2014-02-25 21:12:10 +11:00
unzip_nacl.go all: merge NaCl branch (part 1) 2014-02-25 09:47:42 -05:00
zerrors_darwin_386.go syscall: add {Set,Get}priority for Linux, and consistency tests 2013-06-11 02:47:04 +08:00
zerrors_darwin_amd64.go syscall: add {Set,Get}priority for Linux, and consistency tests 2013-06-11 02:47:04 +08:00
zerrors_dragonfly_386.go syscall: z* files for dragonfly/386 2013-08-31 09:29:38 -07:00
zerrors_dragonfly_amd64.go syscall: dragonfly/amd64 z-files 2013-08-24 01:52:33 +10:00
zerrors_freebsd_386.go net: use F_DUPFD_CLOEXEC when duping fds 2013-08-05 15:43:45 -07:00
zerrors_freebsd_amd64.go net: use F_DUPFD_CLOEXEC when duping fds 2013-08-05 15:43:45 -07:00
zerrors_freebsd_arm.go syscall: add {Set,Get}priority for Linux, and consistency tests 2013-06-11 02:47:04 +08:00
zerrors_linux_386.go syscall: add TCIOFLUSH family of constants 2013-09-13 15:01:22 +10:00
zerrors_linux_amd64.go syscall: add TCIOFLUSH family of constants 2013-09-13 15:01:22 +10:00
zerrors_linux_arm.go syscall: add TCIOFLUSH family of constants 2013-09-13 15:01:22 +10:00
zerrors_netbsd_386.go syscall: include mmap constants in netbsd zerror* files 2014-01-07 23:04:17 +11:00
zerrors_netbsd_amd64.go syscall: include mmap constants in netbsd zerror* files 2014-01-07 23:04:17 +11:00
zerrors_netbsd_arm.go syscall: add {Set,Get}priority for Linux, and consistency tests 2013-06-11 02:47:04 +08:00
zerrors_openbsd_386.go syscall: include mmap constants in openbsd zerror* files 2014-01-13 11:25:48 +11:00
zerrors_openbsd_amd64.go syscall: include mmap constants in openbsd zerror* files 2014-01-13 11:25:48 +11:00
zerrors_plan9_386.go net, os, syscall: Plan 9: adjust error handling 2013-02-28 06:43:21 +01:00
zerrors_plan9_amd64.go net, os, syscall: Plan 9: adjust error handling 2013-02-28 06:43:21 +01:00
zerrors_solaris_amd64.go syscall: generate zfiles for GOOS=solaris 2014-02-25 17:12:19 +09:00
zerrors_windows_386.go
zerrors_windows_amd64.go
zerrors_windows.go
zsyscall_darwin_386.go syscall: add mlock, munlock, mlockall, munlockall and mprotect to OSX 2014-02-27 10:13:41 -08:00
zsyscall_darwin_amd64.go syscall: add mlock, munlock, mlockall, munlockall and mprotect to OSX 2014-02-27 10:13:41 -08:00
zsyscall_dragonfly_386.go syscall: use unsafe.Pointer in BSD kevent 2014-01-22 10:35:41 -08:00
zsyscall_dragonfly_amd64.go syscall: use unsafe.Pointer in BSD kevent 2014-01-22 10:35:41 -08:00
zsyscall_freebsd_386.go syscall: use unsafe.Pointer in BSD kevent 2014-01-22 10:35:41 -08:00
zsyscall_freebsd_amd64.go syscall: use unsafe.Pointer in BSD kevent 2014-01-22 10:35:41 -08:00
zsyscall_freebsd_arm.go syscall: regenerate EABI call convention compliant syscalls for freebsd/arm 2014-02-07 10:23:26 +09:00
zsyscall_linux_386.go syscall: add Dup3 on Linux 2013-07-31 23:38:53 -07:00
zsyscall_linux_amd64.go syscall: use unsafe.Pointer instead of uintptr in net syscalls 2014-01-21 18:54:49 -08:00
zsyscall_linux_arm.go syscall: use unsafe.Pointer instead of uintptr in net syscalls 2014-01-21 18:54:49 -08:00
zsyscall_nacl_386.go all: merge NaCl branch (part 1) 2014-02-25 09:47:42 -05:00
zsyscall_nacl_amd64p32.go all: merge NaCl branch (part 1) 2014-02-25 09:47:42 -05:00
zsyscall_netbsd_386.go syscall: use unsafe.Pointer in BSD kevent 2014-01-22 10:35:41 -08:00
zsyscall_netbsd_amd64.go syscall: use unsafe.Pointer in BSD kevent 2014-01-22 10:35:41 -08:00
zsyscall_netbsd_arm.go syscall: use unsafe.Pointer in BSD kevent 2014-01-22 10:35:41 -08:00
zsyscall_openbsd_386.go syscall: use unsafe.Pointer in BSD kevent 2014-01-22 10:35:41 -08:00
zsyscall_openbsd_amd64.go syscall: use unsafe.Pointer in BSD kevent 2014-01-22 10:35:41 -08:00
zsyscall_plan9_386.go
zsyscall_plan9_amd64.go pkg/syscall: Plan 9, 64-bit: Update error checks from sys calls. 2012-09-28 09:56:44 +10:00
zsyscall_solaris_amd64.go syscall: generate zfiles for GOOS=solaris 2014-02-25 17:12:19 +09:00
zsyscall_windows_386.go net: use SetFileCompletionNotificationModes on windows if available 2013-08-08 17:36:43 +04:00
zsyscall_windows_amd64.go net: use SetFileCompletionNotificationModes on windows if available 2013-08-08 17:36:43 +04:00
zsysctl_openbsd.go runtime, syscall: update for openbsd system ABI break 2014-01-11 19:00:32 +11:00
zsysnum_darwin_386.go
zsysnum_darwin_amd64.go
zsysnum_dragonfly_386.go syscall: z* files for dragonfly/386 2013-08-31 09:29:38 -07:00
zsysnum_dragonfly_amd64.go syscall: dragonfly/amd64 z-files 2013-08-24 01:52:33 +10:00
zsysnum_freebsd_386.go syscall: add PROT_* and MAP_* constants to freebsd 2013-03-09 16:25:30 +11:00
zsysnum_freebsd_amd64.go syscall: add PROT_* and MAP_* constants to freebsd 2013-03-09 16:25:30 +11:00
zsysnum_freebsd_arm.go syscall: add PROT_* and MAP_* constants to freebsd 2013-03-09 16:25:30 +11:00
zsysnum_linux_386.go
zsysnum_linux_amd64.go
zsysnum_linux_arm.go gofmt: apply gofmt -w src misc 2012-10-30 13:38:01 -07:00
zsysnum_netbsd_386.go gofmt: apply gofmt -w src misc 2012-10-30 13:38:01 -07:00
zsysnum_netbsd_amd64.go gofmt: apply gofmt -w src misc 2012-10-30 13:38:01 -07:00
zsysnum_netbsd_arm.go syscall: NetBSD/ARM support 2013-02-13 01:03:25 +08:00
zsysnum_openbsd_386.go runtime, syscall: update for openbsd system ABI break 2014-01-11 19:00:32 +11:00
zsysnum_openbsd_amd64.go runtime, syscall: update for openbsd system ABI break 2014-01-11 19:00:32 +11:00
zsysnum_plan9_386.go
zsysnum_plan9_amd64.go syscall, runtime: Plan 9: use nanotime syscall on amd64 2013-02-26 01:56:08 +01:00
zsysnum_solaris_amd64.go syscall: generate zfiles for GOOS=solaris 2014-02-25 17:12:19 +09:00
zsysnum_windows_386.go
zsysnum_windows_amd64.go
ztypes_darwin_386.go syscall: add IPv6 socket options for Unix variants 2013-05-23 16:22:05 +09:00
ztypes_darwin_amd64.go syscall: add IPv6 socket options for Unix variants 2013-05-23 16:22:05 +09:00
ztypes_dragonfly_386.go syscall: add syscall.Termios on dragonfly, openbsd 2014-01-22 10:39:10 -08:00
ztypes_dragonfly_amd64.go syscall: add syscall.Termios on dragonfly, openbsd 2014-01-22 10:39:10 -08:00
ztypes_freebsd_386.go syscall: add syscall.Termios on freebsd/{386,amd64} 2014-01-13 13:57:38 -08:00
ztypes_freebsd_amd64.go syscall: add syscall.Termios on freebsd/{386,amd64} 2014-01-13 13:57:38 -08:00
ztypes_freebsd_arm.go syscall: fix build on freebsd/arm 2014-02-07 10:23:02 +09:00
ztypes_linux_386.go syscall: add Flock_t on Linux 2014-01-16 14:08:32 -08:00
ztypes_linux_amd64.go syscall: add Flock_t on Linux 2014-01-16 14:08:32 -08:00
ztypes_linux_arm.go syscall: regenerate Flock_t to make it compliant with EABI 2014-02-24 08:36:56 -08:00
ztypes_netbsd_386.go syscall: add syscall.Termios on netbsd 2014-01-19 09:57:02 -08:00
ztypes_netbsd_amd64.go syscall: add syscall.Termios on netbsd 2014-01-19 09:57:02 -08:00
ztypes_netbsd_arm.go syscall: add syscall.Termios on netbsd 2014-01-19 09:57:02 -08:00
ztypes_openbsd_386.go syscall: add syscall.Termios on dragonfly, openbsd 2014-01-22 10:39:10 -08:00
ztypes_openbsd_amd64.go syscall: add syscall.Termios on dragonfly, openbsd 2014-01-22 10:39:10 -08:00
ztypes_plan9_386.go
ztypes_plan9_amd64.go
ztypes_solaris_amd64.go syscall: generate zfiles for GOOS=solaris 2014-02-25 17:12:19 +09:00
ztypes_windows_386.go
ztypes_windows_amd64.go
ztypes_windows.go syscall: add ERROR_MORE_DATA to Windows for os/fsnotify 2014-01-31 17:43:46 +11:00