An error occurred fetching the project authors.
- 29 Mar, 2016 1 commit
-
-
Richard Miller authored
In syscall.forkAndExecInChild, blocks of code labelled Pass 1 and Pass 2 permute the file descriptors (if necessary) which are passed to the child process. If Pass 1 begins with fds = {0,2,1}, nextfd = 4 and pipe = 4, then the statement labelled "don't stomp on pipe" is too late -- the pipe (which will be needed to pass exec status back to the parent) will have been closed by the preceding DUP call. Moving the "don't stomp" test earlier ensures that the pipe is protected. Fixes #14979 Change-Id: I890c311527f6aa255be48b3277c1e84e2049ee22 Reviewed-on: https://go-review.googlesource.com/21184 Run-TryBot: David du Colombier <0intro@gmail.com> Reviewed-by:
David du Colombier <0intro@gmail.com> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 17 Mar, 2016 1 commit
-
-
Richard Miller authored
Between the enumeration of fdsToClose in the parent and the closing of fds in the child, it's possible for a file to be closed in another thread. If that file descriptor is reused when opening the child-parent status pipe, it will be closed prematurely in the child and the forkExec gets out of sync. This has been observed to cause failures in builder tests when the link step of a build is started before the compile step has run, with "file does not exist" messages as the visible symptom. The simple workaround is to check against closing the pipe. A more comprehensive solution would be to rewrite the fd closing code to avoid races, along the lines of the long ago proposed https://golang.org/cl/57890043 - but meanwhile this correction will prevent some builder failures. Change-Id: I4ef5eaea70c21d00f4df0e0847a1c5b2966de7da Reviewed-on: https://go-review.googlesource.com/20800 Run-TryBot: David du Colombier <0intro@gmail.com> Reviewed-by:
David du Colombier <0intro@gmail.com>
-
- 02 Mar, 2016 1 commit
-
-
Brad Fitzpatrick authored
The tree's pretty inconsistent about single space vs double space after a period in documentation. Make it consistently a single space, per earlier decisions. This means contributors won't be confused by misleading precedence. This CL doesn't use go/doc to parse. It only addresses // comments. It was generated with: $ perl -i -npe 's,^(\s*// .+[a-z]\.) +([A-Z]),$1 $2,' $(git grep -l -E '^\s*//(.+\.) +([A-Z])') $ go test go/doc -update Change-Id: Iccdb99c37c797ef1f804a94b22ba5ee4b500c4f7 Reviewed-on: https://go-review.googlesource.com/20022Reviewed-by:
Rob Pike <r@golang.org> Reviewed-by:
Dave Day <djd@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 24 Nov, 2015 1 commit
-
-
David du Colombier authored
On multiprocessor machines, a file descriptor could be closed twice in forkAndExecInChild. Consequently, the close syscall returns the "fd out of range or not open" error and forkAndExecInChild fails. This changes forkAndExecInChild to ignore the error returned by close(fd), as on other operating systems. Fixes #12851. Change-Id: I96a8463ce6599bfd1362353283e0329a00f738da Reviewed-on: https://go-review.googlesource.com/17188Reviewed-by:
Rob Pike <r@golang.org>
-
- 20 Oct, 2015 1 commit
-
-
Ian Lance Taylor authored
Use a go:norace comment rather than having the compiler know the special name syscall.forkAndExecInChild. Change-Id: I69bc6aa6fc40feb2148d23f269ff32453696fb28 Reviewed-on: https://go-review.googlesource.com/16097Reviewed-by:
Minux Ma <minux@golang.org>
-
- 18 Jun, 2015 1 commit
-
-
Shenghou Ma authored
While we're at it, move some misplaced comment blocks around. Change-Id: I1847d7f1ca1dbb8e5de737203c4ed6c66e112508 Reviewed-on: https://go-review.googlesource.com/10188Reviewed-by:
Rob Pike <r@golang.org> Reviewed-by:
Russ Cox <rsc@golang.org>
-
- 28 Feb, 2015 1 commit
-
-
Brad Fitzpatrick authored
On Plan 9, the pwd is apparently per-thread not per process. That means different goroutines saw different current directories, even changing within a goroutine as they were scheduled. Instead, track the the process-wide pwd protected by a mutex in the syscall package and set the current goroutine thread's pwd to the correct once at critical points. Fixes #9428 Change-Id: I928e90886355be4a95c2be834f5883e2b50fc0cf Reviewed-on: https://go-review.googlesource.com/6350Reviewed-by:
David du Colombier <0intro@gmail.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 08 Sep, 2014 1 commit
-
-
Russ Cox authored
Preparation was in CL 134570043. This CL contains only the effect of 'hg mv src/pkg/* src'. For more about the move, see golang.org/s/go14nopkg.
-
- 20 Feb, 2014 1 commit
-
-
Rob Pike authored
Try to prevent messages like this: './pack' file does not exist���������������������������������������������������������������������������������������������������� TBR=adonovan LGTM=adonovan R=adonovan CC=golang-codereviews https://golang.org/cl/66270043
-
- 30 Apr, 2013 1 commit
-
-
Rob Pike authored
exec_plan9.go too. Those are in CL 8334044 R=golang-dev, iant CC=golang-dev https://golang.org/cl/9055043
-
- 23 Jan, 2013 1 commit
-
-
Akshat Kumar authored
Fixes the fork-exec/wait race condition for ForkExec as well, by making it use startProcess. This makes the comment for StartProcess consistent as well. Further, the passing of Waitmsg data in startProcess and WaitProcess is protected against possible forks from outside of ForkExec and StartProcess, which might cause interference with the Await call. R=rsc, rminnich, npe, ality CC=golang-dev https://golang.org/cl/7128059
-
- 18 Jan, 2013 1 commit
-
-
Akshat Kumar authored
On Plan 9, only the parent of a given process can enter its wait queue. When a Go program tries to fork-exec a child process and subsequently waits for it to finish, the goroutines doing these two tasks do not necessarily tie themselves to the same (or any single) OS thread. In the case that the fork and the wait system calls happen on different OS threads (say, due to a goroutine being rescheduled somewhere along the way), the wait() will either return an error or end up waiting for a completely different child than was intended. This change forces the fork and wait syscalls to happen in the same goroutine and ties that goroutine to its OS thread until the child exits. The PID of the child is recorded upon fork and exit, and de-queued once the child's wait message has been read. The Wait API, then, is translated into a synthetic implementation that simply waits for the requested PID to show up in the queue and then reads the associated stats. R=rsc, rminnich, npe, mirtchovski, ality CC=golang-dev https://golang.org/cl/6545051
-
- 26 Nov, 2012 1 commit
-
-
Anthony Martin authored
The API additions to syscall are in dir_plan9.go. R=seed, rsc, rminnich, mirtchovski, dave CC=golang-dev, lucio.dere https://golang.org/cl/6157045
-
- 30 Oct, 2012 1 commit
-
-
Robert Griesemer authored
Remove trailing whitespace in comments. No other changes. R=r CC=golang-dev https://golang.org/cl/6815053
-
- 01 Oct, 2012 1 commit
-
-
Akshat Kumar authored
This change updates CL 6576057 for exceptional cases where return values from Syscall/RawSyscall functions are used. The system calls return 32-bit integers. With the recent change in size of `int' in Go for amd64, the type conversion was not catching `-1' return values. This change makes the conversion explicitly `int32'. R=rsc, r CC=golang-dev https://golang.org/cl/6590047
-
- 06 Aug, 2012 1 commit
-
-
Alexey Borzenkov authored
R=golang-dev, rsc CC=golang-dev, r, yarikos https://golang.org/cl/6454104
-
- 05 Aug, 2012 1 commit
-
-
Alexey Borzenkov authored
Since NUL usually terminates strings in underlying syscalls, allowing it when converting string arguments is a security risk, especially when dealing with filenames. For example, a program might reason that filename like "/root/..\x00/" is a subdirectory or "/root/" and allow access to it, while underlying syscall will treat "\x00" as an end of that string and the actual filename will be "/root/..", which might be unexpected. Returning EINVAL when string arguments have NUL in them makes sure this attack vector is unusable. R=golang-dev, r, bradfitz, fullung, rsc, minux.ma CC=golang-dev https://golang.org/cl/6458050
-
- 26 Apr, 2012 1 commit
-
-
Anthony Martin authored
1. Readdirnames was erroneously returning an empty slice on every invocation. 2. The logic for determining which files to close before exec was incorrect. If the set of files to be kept open (provided by the caller) did not include the files opened at startup, those files would be accidentally closed. I also cleaned up readdupdevice while I was in the vicinity. R=golang-dev, seed, rsc CC=golang-dev https://golang.org/cl/6016044
-
- 17 Apr, 2012 1 commit
-
-
Akshat Kumar authored
This change comes from CL 5536043, created by Andrey Mirtchovski. His description follows: "The plan9 exec child handler does not manage dup-ed fds from the parent correctly: when a dup-ed file descriptor appears in the child's fd list it is closed when first encountered and then subsequent attempt to dup it later in Pass 2 fails, resulting in 'fork/exec: fd out of range or not open'." R=golang-dev, rminnich, ality CC=golang-dev, mirtchovski, rsc https://golang.org/cl/6009046
-
- 02 Mar, 2012 1 commit
-
-
Robert Griesemer authored
R=golang-dev, bradfitz, r CC=golang-dev https://golang.org/cl/5720044
-
- 16 Feb, 2012 1 commit
-
-
David du Colombier authored
NewFile take uintptr make syscall.ProcAttr.Files be []uintptr R=rsc CC=golang-dev https://golang.org/cl/5656073
-
- 02 Feb, 2012 1 commit
-
-
Wei Guangjing authored
R=golang-dev, alex.brainman, rsc CC=golang-dev https://golang.org/cl/5605050
-
- 21 Nov, 2011 1 commit
-
-
Lucio De Re authored
exec_plan9.go: . Adjusted return argument to match other changes. #mksyscall.pl: . Replaced "err = e1" with "err = NewError(e1)". * Change abandoned, Russ made a better suggestion involving syscall_plan9.go. syscall_plan9.go: . Removed redundant "err = nil" lines. . Adjusted //sys lines for mksyscall.pl. * Replaced "err string" with "err ErrorString" in return arguments. zsyscall_plan9_386.go: . This module ought to be generated, but as it exists in the repository, I rebuilt it and checked that it matched expectations. Anybody is welcome to remove this from the repository if they feel it should go, but remember that not all Plan 9 installations have a working Perl. R=rsc CC=ality, golang-dev https://golang.org/cl/5411046
-
- 16 Nov, 2011 1 commit
-
-
Lucio De Re authored
R=rsc, bradfitz CC=golang-dev https://golang.org/cl/5371092
-
- 14 Jun, 2011 1 commit
-
-
Russ Cox authored
R=r, bradfitz, alex.brainman, borman, vincent.vanackere CC=golang-dev https://golang.org/cl/4607046
-
- 10 Jun, 2011 1 commit
-
-
Rob Pike authored
R=golang-dev, gri CC=golang-dev https://golang.org/cl/4602054
-
- 11 Apr, 2011 1 commit
-
-
Fazlul Shahriar authored
This makes os_test.TestStartProcess test from os package pass. R=paulzhol, r2, r CC=golang-dev https://golang.org/cl/4385052
-
- 02 Apr, 2011 1 commit
-
-
Yuval Pavel Zholkover authored
CC=golang-dev https://golang.org/cl/3816043
-