1
0
mirror of https://github.com/golang/go synced 2024-10-04 12:21:26 -06:00
Commit Graph

174 Commits

Author SHA1 Message Date
Graham Miller
cf201ed6a0 os: change Waitmsg String method to use pointer receiver
Fixes #1851.

R=rsc
CC=golang-dev
https://golang.org/cl/4628045
2011-06-20 15:42:17 -04:00
Anthony Martin
20943baed3 exec: add support for Plan 9
R=paulzhol, mirtchovski, fshahriar, alex.brainman, r
CC=golang-dev
https://golang.org/cl/4386041
2011-06-20 13:34:10 +10:00
Yuval Pavel Zholkover
18112437d9 os: Plan 9, fix OpenFile & Chmod. Update tests.
Add Process.Kill.

R=rsc
CC=golang-dev
https://golang.org/cl/4571049
2011-06-14 11:20:34 -04:00
Russ Cox
4d0f2e9195 syscall, os, exec: introduce *syscall.SysProcAttr field in os.ProcAttr and exec.Cmd
R=r, bradfitz, alex.brainman, borman, vincent.vanackere
CC=golang-dev
https://golang.org/cl/4607046
2011-06-14 10:49:34 -04:00
Rob Pike
34e0725dec os: be explicit in the package comment that this package is for portable features only.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4602058
2011-06-14 11:49:33 +10:00
Yuval Pavel Zholkover
6c746328f7 os: fix Getenv for Plan 9. Truncate the rightmost char if it is '\0'.
R=mirtchovski, ality, taruti, rsc
CC=golang-dev
https://golang.org/cl/4386046
2011-06-08 09:44:03 -04:00
Evan Shaw
94b974a22d os: add Process.Kill and Process.Signal
R=alex.brainman, r, rsc, krasin, iant, rsc, r
CC=golang-dev
https://golang.org/cl/4437091
2011-06-06 19:53:30 +10:00
Brad Fitzpatrick
2655757900 http: don't fail on accept hitting EMFILE
Fixes #1891

R=rsc
CC=golang-dev
https://golang.org/cl/4550112
2011-06-03 12:23:50 -07:00
Yuval Pavel Zholkover
f74f50e046 Make unix Readdir and windows Readdirnames return partially successful results on error.
Make plan 9 Readdir & Readdirnames return os.EOF at end.
Also fix typos in the unix and windows comments.

R=golang-dev, fshahriar, bradfitz, rsc, r
CC=golang-dev
https://golang.org/cl/4557053
2011-06-01 13:12:37 +10:00
Robert Hencke
3fbd478a8a pkg: spelling tweaks, I-Z
also, a few miscellaneous fixes to files outside pkg

R=golang-dev, dsymonds, mikioh.mikioh, r
CC=golang-dev
https://golang.org/cl/4517116
2011-05-30 18:02:59 +10:00
Yasuhiro Matsumoto
0f4510b370 os: fix os.MkdirAll with backslash path separator.
MkdirAll() need to use isSeparator().
Move primary defines of filepath.Separator/filepath.ListSeparator
 to os.PathSeparator/os.PathListSeparator.
Move filepath.isSeparator() to os.IsPathSeparator().
filepath package refer them from os package.
Fixes #1831.

R=rsc, alex.brainman
CC=golang-dev
https://golang.org/cl/4535100
2011-05-29 13:03:49 +10:00
Alex Brainman
505f0bb3ce os: fix windows version of Readdir(0)
Fixes #1893.

R=golang-dev
CC=bradfitz, golang-dev
https://golang.org/cl/4528106
2011-05-29 11:59:35 +10:00
Brad Fitzpatrick
685a8157e6 os: yet more Readdir tests and fix earlier regression
R=golang-dev, fshahriar
CC=golang-dev
https://golang.org/cl/4548068
2011-05-27 12:58:59 -07:00
Brad Fitzpatrick
0e865ab8e7 os: improve Readdir test coverage, fix Readdir(0) on EOF
Adds tests for Readdir and Readdirnames with different n
values.  No good way to inject faults during full reads,
though.

Also fixes bug report from fshahriar:
Readdir(0) wasn't behaving like Readdir(-1).

R=rsc, fshahriar
CC=golang-dev
https://golang.org/cl/4529092
2011-05-27 12:14:48 -07:00
Alex Brainman
cb96d98b06 os: another attempt to handle OpenFile flag parameter properly on Windows
Fixes #1791.

R=rsc, r, r, iant
CC=golang-dev
https://golang.org/cl/4551046
2011-05-27 17:02:24 +10:00
Alex Brainman
86327cdcf5 os: TestMkdirAll should not fail to delete _test/_TestMkdirAll_ on Windows
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4515142
2011-05-27 09:52:15 +10:00
Ian Lance Taylor
ddcdbd4470 os: Fix test to work on Solaris.
On Solaris /bin is a symlink to /usr/bin, so running "pwd" in
the directory "/bin" prints out "/usr/bin".

R=rsc, r, bradfitz
CC=golang-dev
https://golang.org/cl/4559043
2011-05-24 22:53:37 -07:00
Robert Griesemer
b790ae2efb go/printer, gofmt: fix formatting of expression lists (missing blank)
This appears to have been a long-standing formatting bug.
The test cases has misformatted golden files.

Applied gofmt -w src misc .

Fixes #1839.

R=iant
CC=golang-dev
https://golang.org/cl/4515113
2011-05-19 17:05:35 -07:00
Robert Hencke
3faa490f89 pkg: fix new incorrect prints found by govet
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4539063
2011-05-16 21:15:06 -07:00
Brad Fitzpatrick
3587085fb7 os: fix Windows build from earlier readdir change
It worked originally, until I renamed a variable. :/

dir_windows.go:11: undefined: e
http://godashboard.appspot.com/log/092397f2ac7a1e6e812dc6bebc65b40b02368700a119343d5cee5e2e89e0fde5

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4535072
2011-05-16 10:27:49 -07:00
Brad Fitzpatrick
4da5cd4cd6 os: make Readdir & Readdirnames return os.EOF at end
Fixes #678

R=rsc, r, alex.brainman, bsiegert, jdpoirier
CC=golang-dev
https://golang.org/cl/4536058
2011-05-16 09:26:16 -07:00
Robert Hencke
cc2fc02467 pkg: fix incorrect prints found by govet
Also, clarify some error messages

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4548042
2011-05-14 20:43:18 -07:00
Brad Fitzpatrick
ec1ee024ad os: remove race paranoia from Environ(); it's guarded now
R=rsc
CC=golang-dev
https://golang.org/cl/4426077
2011-05-02 23:08:27 -04:00
Brad Fitzpatrick
623e7de187 os: make Setenv update C environment variables
Fixes #1569

R=rsc, bradfitzwork
CC=golang-dev
https://golang.org/cl/4456045
2011-05-02 12:38:13 -07:00
Alex Brainman
b1deb3be7f os: fix race in ReadAt/WriteAt on Windows
R=bradfitzgo, rsc, peterGo
CC=golang-dev
https://golang.org/cl/4441051
2011-04-26 18:09:46 +10:00
Russ Cox
8698bb6c8c runtime: turn "too many EPIPE" into real SIGPIPE
Tested on Linux and OS X, amd64 and 386.

R=r, iant
CC=golang-dev
https://golang.org/cl/4452046
2011-04-25 16:58:00 -04:00
Dave Cheney
d5864454dc syscall: fix Ftruncate under linux/arm5
Fixes #1714.

R=rsc, bradfitzgo
CC=golang-dev
https://golang.org/cl/4441056
2011-04-22 14:44:18 -04:00
Brad Fitzpatrick
4335bee42e os/user: new package to look up users
Only for Unix presently. Other operating systems
are stubbed out, as well as arm (lacks cgo).

R=rsc, r, bradfitzwork
CC=golang-dev
https://golang.org/cl/4440057
2011-04-22 09:30:30 -07:00
Alex Brainman
59c18b0b36 os: Open with O_APPEND|O_CREATE to append to the end of file on Windows
Credit for the fix goes to Hector, test by PeterGo.

Fixes #1655.

R=golang-dev, rsc1, peterGo
CC=golang-dev, hector
https://golang.org/cl/4436051
2011-04-22 15:31:25 +10:00
Nigel Tao
6a186d38d1 src/pkg: make package doc comments consistently start with "Package foo".
R=rsc
CC=golang-dev
https://golang.org/cl/4442064
2011-04-20 09:57:05 +10:00
Russ Cox
6ca71fb897 os: turn EPIPE exit into panic
R=iant, r2
CC=golang-dev
https://golang.org/cl/4427042
2011-04-15 00:01:29 -04:00
Robert Griesemer
a2e286828b gofmt: gofmt -s -w src misc
R=r, bradfitzwork
CC=golang-dev
https://golang.org/cl/4406044
2011-04-13 15:13:59 -07:00
Russ Cox
da8c5e7239 os/inotify: use _test for test files, not _obj
R=golang-dev, r, iant2
CC=golang-dev
https://golang.org/cl/4408043
2011-04-13 16:17:49 -04:00
Fazlul Shahriar
08b0927771 os: fix Readdir in Plan 9
'TestReaddir.*' tests now passes.

R=golang-dev, lucio, r
CC=golang-dev
https://golang.org/cl/4381048
2011-04-12 16:58:56 -07:00
Russ Cox
cf56f06ab6 os, syscall: refactor Unix directory parsing
Moved the details of how to read a directory
and how to parse the results behind the new
syscall functions ReadDirent and ParseDirent.

Now os needs just one copy of Readdirnames
for the three Unix variants, and it no longer
imports "unsafe".

R=r, r2
CC=golang-dev
https://golang.org/cl/4368048
2011-04-06 15:44:40 -04:00
Rob Pike
80c5ef9f31 os: fix windows build
R=brainman
CC=golang-dev
https://golang.org/cl/4308047
2011-04-04 23:57:08 -07:00
Rob Pike
8a90fd3c72 os: New Open API.
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-04-04 23:42:14 -07:00
Brad Fitzpatrick
2be13a80c7 os: add Seek whence constants
R=r, r2, rsc1, rsc, jacek.masiulaniec
CC=golang-dev
https://golang.org/cl/4344062
2011-04-04 13:53:52 -07:00
Albert Strasheim
492039ae7f os: Fix MkdirAll("/thisdoesnotexist").
Fixes #1637.

R=rsc, rh, msolo
CC=golang-dev
https://golang.org/cl/4317049
2011-04-04 15:45:03 -04:00
Andrey Mirtchovski
69819c2ea3 os: add a few missing plan9 errors
these were needed by packages in crypto/ and by io/ioutil

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4350047
2011-04-03 08:52:43 -07:00
Yuval Pavel Zholkover
c256f0a4b3 os: Plan 9 support.
R=rsc, ality, r, r2
CC=golang-dev
https://golang.org/cl/4149046
2011-04-02 14:28:58 -07:00
David Forsythe
85c79ef7cb os: fix FileInfo.Name returned by Stat
Fixes #1645.

R=rsc
CC=golang-dev
https://golang.org/cl/4321045
2011-03-29 14:23:36 -04:00
Alex Brainman
913c8d7397 syscall: StartProcess fixes for windows
- 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-24 11:20:28 +11:00
Caine Tighe
b3166bcb8e os: remove fstat TODO
R=rsc
CC=golang-dev
https://golang.org/cl/3559041
2011-03-17 13:57:36 -04:00
Roger Peppe
aa55c05213 os, syscall: add ProcAttr type. Change StartProcess etc. to use it.
The Windows code is untested.

R=rsc, gri, brainman, rsc1
CC=golang-dev
https://golang.org/cl/4253052
2011-03-15 14:41:19 -04:00
Russ Cox
3f915f51a8 go code: replace closed(c) with x, ok := <-c
R=golang-dev, rog, bradfitzwork, r
CC=golang-dev
https://golang.org/cl/4243072
2011-03-11 14:47:44 -05:00
Ian Lance Taylor
89930bda9d os: adjust test: /bin is a symlink, not a directory, on Solaris.
R=rsc
CC=golang-dev
https://golang.org/cl/4239066
2011-03-07 15:30:51 -08:00
Russ Cox
52ffb6af00 os: remove ENODATA (fixes freebsd build)
R=r, r2
CC=golang-dev
https://golang.org/cl/4175053
2011-02-16 14:10:52 -05:00
Albert Strasheim
e881d42f87 os: add ENODATA and ENOTCONN
syscall: add MCL_* flags for mlockall

R=rsc
CC=golang-dev
https://golang.org/cl/4177044
2011-02-16 13:19:31 -05:00
Mathieu Lonjaret
047b023119 fix example in inotify
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4174045
2011-02-11 08:30:34 -05:00