aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/exec
AgeCommit message (Collapse)Author
2011-11-03os,text,unicode: renamingsRob Pike
This is Go 1 package renaming CL #4. This one merely moves the source; the import strings will be changed after the next weekly release. This one moves pieces into os, text, and unicode. exec -> os/exec scanner -> text/scanner tabwriter -> text/tabwriter template -> text/template template/parse -> text/template/parse utf16 -> unicode/utf16 utf8 -> unicode/utf8 This should be the last of the source-rearranging CLs. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5331066
2011-11-02all: sort importsRuss Cox
R=golang-dev, r CC=golang-dev https://golang.org/cl/5319072
2011-11-01src/pkg/[a-m]*: gofix -r error -force=errorRuss Cox
R=golang-dev, iant CC=golang-dev https://golang.org/cl/5322051
2011-11-01exec: introduce ExitErrorRuss Cox
The existing code uses *os.Waitmsg as an os.Error, but *os.Waitmsg is really just a stringer. Introduce an explicit error type for the real error. Not to be submitted until just before error goes in; the gofix for error updates type assertions err.(*os.Waitmsg) to err.(*exec.ExitError) The seemingly redundant String method will become an Error method when error goes in, and will no longer be redundant. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5331044
2011-10-06exec: add Command.ExtraFilesBrad Fitzpatrick
Allows passing extra fds to the child process. Fixes #2329 R=rsc, dsymonds CC=golang-dev https://golang.org/cl/5162050
2011-09-15build: add build comments to core packagesRuss Cox
The go/build package already recognizes system-specific file names like mycode_darwin.go mycode_darwin_386.go mycode_386.s However, it is also common to write files that apply to multiple architectures, so a recent CL added to go/build the ability to process comments listing a set of conditions for building. For example: // +build darwin freebsd openbsd/386 says that this file should be compiled only on OS X, FreeBSD, or 32-bit x86 OpenBSD systems. These conventions are not yet documented (hence this long CL description). This CL adds build comments to the multi-system files in the core library, a step toward making it possible to use go/build to build them. With this change go/build can handle crypto/rand, exec, net, path/filepath, os/user, and time. os and syscall need additional adjustments. R=golang-dev, r, gri, r, gustavo CC=golang-dev https://golang.org/cl/5011046
2011-08-12crypto, exec, path, time: add support for OpenBSDJoel Sing
R=golang-dev, r CC=golang-dev https://golang.org/cl/4837048
2011-07-14go/printer: changed max. number of newlines from 3 to 2Robert Griesemer
manual changes in src/pkg/go/printer, src/cmd/gofix/signal_test.go (cd src/cmd/gofix/testdata; gofmt -w *.in *.out) (cd src/pkg/go/printer; gotest -update) gofmt -w misc src runs all tests R=golang-dev, rsc CC=golang-dev https://golang.org/cl/4715041
2011-07-11cgi: close stdout reader pipe when finishedBrad Fitzpatrick
This causes the child, if still writing, to get an error or SIGPIPE and most likely exit so our subsequent wait can finish. A more guaranteed fix would be putting a time limit on the child's overall execution, but this fixes the problem I was having. Fixes #2059 R=rsc CC=golang-dev https://golang.org/cl/4675081
2011-07-11exec: closeAfterWait append bugBrad Fitzpatrick
Wasn't actually eager closing the fds as a result of the copy/paste bug. (GC was doing it instead) R=rsc CC=golang-dev https://golang.org/cl/4671057
2011-06-28strings.Split: make the default to split all.Rob Pike
Change the signature of Split to have no count, assuming a full split, and rename the existing Split with a count to SplitN. Do the same to package bytes. Add a gofix module. R=adg, dsymonds, alex.brainman, rsc CC=golang-dev https://golang.org/cl/4661051
2011-06-23exec: LookPath should not search %PATH% for files like c:cmd.exeAlex Brainman
R=golang-dev CC=golang-dev https://golang.org/cl/4632055
2011-06-23exec: better error message for windows LookPathAlex Brainman
Fixes #1991. R=golang-dev, bradfitz, rsc CC=golang-dev https://golang.org/cl/4648049
2011-06-22os.Error API: don't export os.ErrorString, use os.NewError consistentlyRobert Griesemer
This is a core API change. 1) gofix misc src 2) Manual adjustments to the following files under src/pkg: gob/decode.go rpc/client.go os/error.go io/io.go bufio/bufio.go http/request.go websocket/client.go as well as: src/cmd/gofix/testdata/*.go.in (reverted) test/fixedbugs/bug243.go 3) Implemented gofix patch (oserrorstring.go) and test case (oserrorstring_test.go) Compiles and runs all tests. R=r, rsc, gri CC=golang-dev https://golang.org/cl/4607052
2011-06-20exec: add support for Plan 9Anthony Martin
R=paulzhol, mirtchovski, fshahriar, alex.brainman, r CC=golang-dev https://golang.org/cl/4386041
2011-06-14exec: make LookPath work even when PATHEXT env variable is not set on WindowsAlex Brainman
R=golang-dev, mattn.jp CC=golang-dev https://golang.org/cl/4559062
2011-06-14syscall, os, exec: introduce *syscall.SysProcAttr field in os.ProcAttr and ↵Russ Cox
exec.Cmd R=r, bradfitz, alex.brainman, borman, vincent.vanackere CC=golang-dev https://golang.org/cl/4607046
2011-06-07exec: export the underlying *os.Process in CmdBrad Fitzpatrick
R=rsc CC=golang-dev https://golang.org/cl/4579044
2011-06-03exec: change exec.PathError to exec.ErrorRob Pike
There were two issues: 1) It might not be a path error, it might be 'permission denied'. 2) The concept of $PATH is Unix-specific. R=alex.brainman, rsc, r, mattn.jp CC=golang-dev https://golang.org/cl/4530096
2011-06-02exec: add Cmd methods StdinPipe, StdoutPipe, StderrPipeBrad Fitzpatrick
It gets annoying to do this in caller code otherwise, especially having to remember to Close one side. R=rsc CC=golang-dev https://golang.org/cl/4517134
2011-06-02exec: missing docs, errorsBrad Fitzpatrick
R=rsc CC=golang-dev https://golang.org/cl/4550111
2011-06-01exec: new API, replace Run with CommandBrad Fitzpatrick
This removes exec.Run and replaces exec.Cmd with a new implementation. The new exec.Cmd represents both a currently-running command and also a command being prepared. It has a good zero value. You can Start + Wait on a Cmd, or simply Run it. Start (and Run) deal with copying stdout, stdin, and stderr between the Cmd's io.Readers and io.Writers. There are convenience methods to capture a command's stdout and/or stderr. R=r, n13m3y3r, rsc, gustavo, alex.brainman, dsymonds, r, adg, duzy.chan, mike.rosset, kevlar CC=golang-dev https://golang.org/cl/4552052
2011-05-28gotest, pkg/exec: use bash instead of sh to execute shell scripts on windowsAlex Brainman
As suggested by dho, iant2. R=golang-dev, rsc CC=devon.odell, golang-dev, iant https://golang.org/cl/4515147
2011-04-21syscall: correct Windows CreateProcess input parametersAlex Brainman
Fixes #1718. R=golang-dev, rsc, peterGo, r CC=golang-dev https://golang.org/cl/4435059
2011-04-20src/pkg: make package doc comments consistently start with "Package foo".Nigel Tao
R=rsc CC=golang-dev https://golang.org/cl/4442064
2011-04-06exec: add a little package commentary explaining itsRob Pike
relationship to os.Process. R=golang-dev, rsc1 CC=golang-dev https://golang.org/cl/4384041
2011-04-04os: New Open API.Rob Pike
We replace the current Open with: OpenFile(name, flag, perm) // same as old Open Open(name) // same as old Open(name, O_RDONLY, 0) Create(name) // same as old Open(name, O_RDWR|O_TRUNC|O_CREAT, 0666) This CL includes a gofix module and full code updates: all.bash passes. (There may be a few comments I missed.) The interesting packages are: gofix os Everything else is automatically generated except for hand tweaks to: src/pkg/io/ioutil/ioutil.go src/pkg/io/ioutil/tempfile.go src/pkg/crypto/tls/generate_cert.go src/cmd/goyacc/goyacc.go src/cmd/goyacc/units.y R=golang-dev, bradfitzwork, rsc, r2 CC=golang-dev https://golang.org/cl/4357052
2011-03-24syscall: StartProcess fixes for windowsAlex Brainman
- StartProcess will work with relative (to attr.Dir, not current directory) executable filenames - StartProcess will only work if executable filename points to the real file, it will not search for executable in the $PATH list and others (see CreateProcess manual for details) - StartProcess argv strings can contain any characters R=golang-dev, r CC=golang-dev https://golang.org/cl/4306041
2011-03-21exec: document dir option for RunGustavo Niemeyer
R=golang-dev, bradfitzwork, rsc1, peterGo CC=golang-dev https://golang.org/cl/4271056
2011-03-15os, syscall: add ProcAttr type. Change StartProcess etc. to use it.Roger Peppe
The Windows code is untested. R=rsc, gri, brainman, rsc1 CC=golang-dev https://golang.org/cl/4253052
2011-02-04os: implement new Process apiAlex Brainman
Fixes #1004. Fixes #1460. R=mattn, r, niemeyer, rog, rsc CC=golang-dev https://golang.org/cl/4029053
2011-02-01log: rename Exit* to Fatal*Rob Pike
This aligns the naming scheme with the testing package and also lets govet work on more logging calls. R=rsc CC=golang-dev https://golang.org/cl/4001048
2011-02-01exec: use custom error for LookPathGustavo Niemeyer
Make the error message and the needed action more obvious when a command isn't found to obtain the source code of a project. Users seem to strugle with the existing wording in practice. R=rsc CC=golang-dev https://golang.org/cl/4058047
2010-12-15remove naclRuss Cox
The recent linker changes broke NaCl support a month ago, and there are no known users of it. The NaCl code can always be recovered from the repository history. R=adg, r CC=golang-dev https://golang.org/cl/3671042
2010-12-07exec.LookPath: return os.PathError instad of os.ENOENT, it's more descriptive.Michael Hoisie
R=rsc CC=golang-dev https://golang.org/cl/3448042
2010-11-13exec: enable tests on windowsAlex Brainman
Fixes #1104. R=golang-dev, mattn, r CC=Joe Poirier, golang-dev https://golang.org/cl/3051041
2010-11-01strings: ContainsBrad Fitzpatrick
Tiny helper to avoid strings.Index(s, sub) != -1 R=rsc, r2, r CC=golang-dev https://golang.org/cl/2265044
2010-09-12exec.LookPath() unix/windows separationJoe Poirier
R=brainman, rsc, vcc, rsc1 CC=golang-dev https://golang.org/cl/2068041
2010-09-07os, exec: rename argv0 to nameRuss Cox
R=r, gri1 CC=golang-dev https://golang.org/cl/2119044
2010-08-18build: no required environment variablesRuss Cox
R=adg, r, PeterGo CC=golang-dev https://golang.org/cl/1942044
2010-08-09os: fix ForkExec() handling of envv == nilAlex Brainman
R=golang-dev, r CC=golang-dev https://golang.org/cl/1913047
2010-08-03os: Null devicePeter Mundy
R=rsc, cw CC=golang-dev https://golang.org/cl/1854042
2010-07-01strings and bytes.Split: make count of 0 mean 0, not infinite.Rob Pike
Use a count of -1 for infinity. Ditto for Replace. R=rsc CC=golang-dev https://golang.org/cl/1704044
2010-05-27changes &x -> x[0:] for array to slice conversionRuss Cox
R=gri CC=golang-dev https://golang.org/cl/1326042
2010-02-18exec: add dir argument to Run.Russ Cox
fix, test MergeWithStdout R=r CC=golang-dev https://golang.org/cl/214046
2009-12-15 1) Change default gofmt default settings forRobert Griesemer
parsing and printing to new syntax. Use -oldparser to parse the old syntax, use -oldprinter to print the old syntax. 2) Change default gofmt formatting settings to use tabs for indentation only and to use spaces for alignment. This will make the code alignment insensitive to an editor's tabwidth. Use -spaces=false to use tabs for alignment. 3) Manually changed src/exp/parser/parser_test.go so that it doesn't try to parse the parser's source files using the old syntax (they have new syntax now). 4) gofmt -w src misc test/bench 2nd set of files. R=rsc CC=golang-dev https://golang.org/cl/179067
2009-12-02move ReadFile, WriteFile, and ReadDir into a separate io/ioutil package.Rob Pike
this breaks the dependency of package io on package bytes. R=rsc CC=golang-dev https://golang.org/cl/163085
2009-11-23go: makes it build for the case $GOROOT has whitespacesSergio Luis O. B. Correia
the bash scripts and makefiles for building go didn't take into account the fact $GOROOT / $GOBIN could both be directories containing whitespaces, and was not possible to build it in such a situation. this commit adjusts the various makefiles/scripts to make it aware of that possibility, and now it builds successfully when using a path with whitespaces as well. Fixes #115. R=rsc, dsymonds1 https://golang.org/cl/157067
2009-11-09 - replaced gofmt expression formatting algorithm withRobert Griesemer
rsc's algorithm - applied gofmt -w misc src - partial CL (remaining files in other CLs) R=rsc, r http://go/go-review/1026036
2009-11-09remove semis after statements in one-statement statement listsRobert Griesemer
R=rsc, r http://go/go-review/1025029