summaryrefslogtreecommitdiff
path: root/src/os/exec
Commit message (Collapse)AuthorAgeFilesLines
* os/exec: add example for Cmd.RunAndré Carvalho2017-07-151-0/+7
| | | | | | | | Change-Id: Ic47198bc8bf5baabfcf4d0599825eab30d7b126c Reviewed-on: https://go-review.googlesource.com/48853 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* os/exec: clarify Cmd.Wait documentation a bit more explicitlyBrad Fitzpatrick2017-07-061-2/+4
| | | | | | | | | | | | | It already implied that Cmd.Wait is more than os.Process.Wait, but say so explicitly. See https://github.com/golang/go/issues/18874#issuecomment-309921486 Updates #18874 Change-Id: Iaa46defd776ae0be817d9f4466a99ac78cfd672b Reviewed-on: https://go-review.googlesource.com/47650 Reviewed-by: Russ Cox <rsc@golang.org>
* os/exec: document lack of implicit shell usage or globbingBrad Fitzpatrick2017-07-061-0/+9
| | | | | | | | Fixes #20894 Change-Id: I0c0e906964bbd789317d07f245e64e3d61ecfa8c Reviewed-on: https://go-review.googlesource.com/47550 Reviewed-by: Russ Cox <rsc@golang.org>
* os/exec: remove BUG for old and unsupported OSBrad Fitzpatrick2017-06-091-3/+0
| | | | | | | | | | Nobody uses 10.6 these days anyway. Fixes #20623 Change-Id: I698c83cbc288082558e34097ff54d1428aed75ec Reviewed-on: https://go-review.googlesource.com/45171 Reviewed-by: Matt Layher <mdlayher@gmail.com>
* os/exec: ignore some pipe write errors on windowsAlex Brainman2017-05-233-12/+51
| | | | | | | | | | | | | | This change is windows version of CL 12152. It also extends test to cover scenarios reported on issue #20445. Some source files copied and renamed to make code clearer. Fixes #20445 Change-Id: Idd2f636f27c6bd5cfe98017ba2df911358263382 Reviewed-on: https://go-review.googlesource.com/43910 Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* os/exec: document that non-comparable writers may raceJustin Nuß2017-04-281-2/+2
| | | | | | | | | | | | | | | The comment for Cmd.Stdout and Cmd.Stderr says that it's safe to set both to the same writer, but it doesn't say that this only works when both writers are comparable. This change updates the comment to explain that using a non-comparable writer may still lead to a race. Fixes #19804 Change-Id: I63b420034666209a2b6fab48b9047c9d07b825e2 Reviewed-on: https://go-review.googlesource.com/42052 Reviewed-by: Ian Lance Taylor <iant@golang.org>
* os/exec: Update Cmd.Run() docs to reflect correct error return typesNick Kubala2017-04-081-3/+2
| | | | | | Change-Id: I3fe92d74ff259abdf5d1fd28cdc822db88aae191 Reviewed-on: https://go-review.googlesource.com/39993 Reviewed-by: Ian Lance Taylor <iant@golang.org>
* os: don't use waitid on DarwinIan Lance Taylor2017-03-012-0/+41
| | | | | | | | | | | | | According to issue #19314 waitid on Darwin returns if the process is stopped, even though we specify WEXITED. Fixes #19314. Change-Id: I95faf196c11e43b7741efff79351bab45c811bc2 Reviewed-on: https://go-review.googlesource.com/37610 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* os/exec: remove duplicate environment variables in Cmd.StartBrad Fitzpatrick2017-02-284-2/+109
| | | | | | | | | | | | | | | | Nobody intends to have duplicates anyway because it's so undefined and everything handles it so poorly. Removing duplicates automatically simplifies code and makes existing code do what people already expect. Fixes #12868 Change-Id: I95eeba8c59ff94d0f018012a6f4e031aaabfd5d9 Reviewed-on: https://go-review.googlesource.com/37586 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* os/exec: deflake TestPipeLookPathLeakMichael Munday2017-02-241-30/+57
| | | | | | | | | | | | | | | | | | | | | | The number of open file descriptors reported by lsof is unreliable because it depends on whether the parent process (the test) closed the file descriptors it passed into the child process (lsof) before lsof runs. Reading /proc/self/fd directly on Linux appears to be much more reliable and still detects any file descriptor leaks originating from attempting to run an executable that cannot be found (issue #5071). If /proc/self/fd is not available (e.g. on Darwin) then we fall back to lsof and tolerate small differences in open file descriptor counts. Fixes #19243. Change-Id: I052b0c129e609010f1083e43a9911cba154117bf Reviewed-on: https://go-review.googlesource.com/37343 Run-TryBot: Michael Munday <munday@ca.ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* os/exec: deflake TestStdinCloseRaceIan Lance Taylor2017-02-211-3/+7
| | | | | | | | | | | | | | | Stop reporting errors from cmd.Process.Kill; they don't matter for purposes of this test, and they can occur if the process exits quickly. Fixes #19211. Fixes #19213. Change-Id: I1a0bb9170220ca69199abb8e8811b1dde43e1897 Reviewed-on: https://go-review.googlesource.com/37309 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* syscall: only call setgroups if we need toWander Lairson Costa2017-02-171-0/+45
| | | | | | | | | | | | | | | | | | | | | If the caller set ups a Credential in os/exec.Command, os/exec.Command.Start will end up calling setgroups(2), even if no supplementary groups were given. Only root can call setgroups(2) on BSD kernels, which causes Start to fail for non-root users when they try to set uid and gid for the new process. We fix by introducing a new field to syscall.Credential named NoSetGroups, and setgroups(2) is only called if it is false. We make this field with inverted logic to preserve backward compatibility. RELNOTES=yes Change-Id: I3cff1f21c117a1430834f640ef21fd4e87e06804 Reviewed-on: https://go-review.googlesource.com/36697 Reviewed-by: Ian Lance Taylor <iant@golang.org>
* os: use poller for file I/OIan Lance Taylor2017-02-151-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the os package to use the runtime poller for file I/O where possible. When a system call blocks on a pollable descriptor, the goroutine will be blocked on the poller but the thread will be released to run other goroutines. When using a non-pollable descriptor, the os package will continue to use thread-blocking system calls as before. For example, on GNU/Linux, the runtime poller uses epoll. epoll does not support ordinary disk files, so they will continue to use blocking I/O as before. The poller will be used for pipes. Since this means that the poller is used for many more programs, this modifies the runtime to only block waiting for the poller if there is some goroutine that is waiting on the poller. Otherwise, there is no point, as the poller will never make any goroutine ready. This preserves the runtime's current simple deadlock detection. This seems to crash FreeBSD systems, so it is disabled on FreeBSD. This is issue 19093. Using the poller on Windows requires opening the file with FILE_FLAG_OVERLAPPED. We should only do that if we can remove that flag if the program calls the Fd method. This is issue 19098. Update #6817. Update #7903. Update #15021. Update #18507. Update #19093. Update #19098. Change-Id: Ia5197dcefa7c6fbcca97d19a6f8621b2abcbb1fe Reviewed-on: https://go-review.googlesource.com/36800 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
* os/exec: fix race in TestStdinCloseRaceIan Lance Taylor2016-12-131-1/+11
| | | | | | | | | | | The test for the race detector itself had a race of a sort not detected by the race detector. Fixes #18286. Change-Id: I3265eae275aaa2869a6b6d3e8675b0d88b25831b Reviewed-on: https://go-review.googlesource.com/34287 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* all: make spelling consistentBrad Fitzpatrick2016-12-081-1/+1
| | | | | | | | | | Fixes #17938 Change-Id: Iad12155f4976846bd4a9a53869f89e40e5b3deb3 Reviewed-on: https://go-review.googlesource.com/34147 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
* os/exec: add closeOnce.WriteString methodIan Lance Taylor2016-11-162-0/+33
| | | | | | | | | | | | | | | Add an explicit WriteString method to closeOnce that acquires the writers lock. This overrides the one promoted from the embedded *os.File field. The promoted one naturally does not acquire the lock, and can therefore race with the Close method. Fixes #17647. Change-Id: I3460f2a0d503449481cfb2fd4628b4855ab0ecdf Reviewed-on: https://go-review.googlesource.com/33298 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* all: don't call t.Fatal from a goroutineIan Lance Taylor2016-11-151-1/+1
| | | | | | | | | | Fixes #17900. Change-Id: I42cda6ac9cf48ed739d3a015a90b3cb15edf8ddf Reviewed-on: https://go-review.googlesource.com/33243 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* os/exec: document how Command fills in Cmd.ArgsQuentin Smith2016-10-281-3/+4
| | | | | | | | Fixes #17536 Change-Id: Ica8c3d696848822ac65b7931455b1fd94809bfe8 Reviewed-on: https://go-review.googlesource.com/31710 Reviewed-by: Russ Cox <rsc@golang.org>
* os/exec: allow simultaneous cmd.Wait and Write of cmd.StdinPipeRuss Cox2016-10-182-3/+66
| | | | | | | | | | | | | | | | cmd.StdinPipe returns an io.WriteCloser. It's reasonable to expect the caller not to call Write and Close simultaneously, but there is an implicit Close in cmd.Wait that's not obvious. We already synchronize the implicit Close in cmd.Wait against any explicit Close from the caller. Also synchronize that implicit Close against any explicit Write from the caller. Fixes #9307. Change-Id: I8561e9369d6e5ac88dfbca1175549f6dfa04b8ac Reviewed-on: https://go-review.googlesource.com/31148 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* os/exec: add example for CommandContextAlexander Döring2016-10-051-0/+12
| | | | | | | | | | Updates #16360 Change-Id: I0e0afe7a89f2ebcb3e5bbc345f77a605d3afc398 Reviewed-on: https://go-review.googlesource.com/30103 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* os/exec: add examples for CombinedOutput, StdinPipe, StderrPipeEmmanuel Odeke2016-09-161-0/+50
| | | | | | | | | | | | | | | Updates #16360. Adds examples for: + CombinedOutput + StdinPipe + StderrPipe Change-Id: I19293e64b34ed9268da00e0519173a73bfbc2c10 Reviewed-on: https://go-review.googlesource.com/29150 Run-TryBot: Andrew Gerrand <adg@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org>
* os/exec: fix nit found by vetMikio Hara2016-08-161-1/+1
| | | | | | Change-Id: I8085ed43d63215237a4871cc1e44257132a7f5de Reviewed-on: https://go-review.googlesource.com/27130 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* os/exec: start checking for context cancelation in StartIan Lance Taylor2016-06-302-13/+93
| | | | | | | | | | | | | | Previously we started checking for context cancelation in Wait, but that meant that when using StdoutPipe context cancelation never took effect. Fixes #16222. Change-Id: I89cd26d3499a6080bf1a07718ce38d825561899e Reviewed-on: https://go-review.googlesource.com/24650 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* os/exec: remove Cmd.RunContext and Cmd.WaitContext, add CommandContextBrad Fitzpatrick2016-05-202-24/+32
| | | | | | | | | Fixes #15775 Change-Id: I0a6c2ca09d3850c3538494711f7a9801b9500411 Reviewed-on: https://go-review.googlesource.com/23300 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* os/exec: cleanup and remove duplicated codeHiroshi Ioka2016-05-114-60/+29
| | | | | | | | Change-Id: Ia2f61427b1cc09064ac4c0563bccbd9b98767a0e Reviewed-on: https://go-review.googlesource.com/18118 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* os/exec: re-enable TestExtraFiles for plan9Richard Miller2016-05-051-4/+0
| | | | | | | | | | | This test should now succeed after CL 22610 which fixes issue #7118 Change-Id: Ie785a84d77b27c832a1ddd81699bf25dab24b97d Reviewed-on: https://go-review.googlesource.com/22640 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: David du Colombier <0intro@gmail.com> Run-TryBot: David du Colombier <0intro@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
* os/exec: fix variable shadow, don't leak goroutineBrad Fitzpatrick2016-04-281-1/+1
| | | | | | | | | | | | Goroutine leak checking is still too tedious, so untested. See #6705 which is my fault for forgetting to mail out. Change-Id: I899fb311c9d4229ff1dbd3f54fe307805e17efee Reviewed-on: https://go-review.googlesource.com/22581 Reviewed-by: Ahmed W. <oneofone@gmail.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* os/exec: add Cmd.RunContext and Cmd.WaitContextBrad Fitzpatrick2016-04-282-0/+70
| | | | | | | | | | Updates #14660 Change-Id: Ifa5c97ba327ad7ceea0a9a252e3dbd9d079dae54 Reviewed-on: https://go-review.googlesource.com/22529 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* all: use new io.SeekFoo constants instead of os.SEEK_FOOBrad Fitzpatrick2016-04-131-1/+1
| | | | | | | | | | | | Automated change. Fixes #15269 Change-Id: I8deb2ac0101d3f7c390467ceb0a1561b72edbb2f Reviewed-on: https://go-review.googlesource.com/21962 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* all: single space after period.Brad Fitzpatrick2016-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | 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/20022 Reviewed-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>
* all: make copyright headers consistent with one space after periodBrad Fitzpatrick2016-03-014-4/+4
| | | | | | | | | | | | | | | | | | | | | | This is a subset of https://golang.org/cl/20022 with only the copyright header lines, so the next CL will be smaller and more reviewable. Go policy has been single space after periods in comments for some time. The copyright header template at: https://golang.org/doc/contribute.html#copyright also uses a single space. Make them all consistent. Change-Id: Icc26c6b8495c3820da6b171ca96a74701b4a01b0 Reviewed-on: https://go-review.googlesource.com/20111 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
* all: remove public named return values when uselessBrad Fitzpatrick2016-02-291-13/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Named returned values should only be used on public funcs and methods when it contributes to the documentation. Named return values should not be used if they're only saving the programmer a few lines of code inside the body of the function, especially if that means there's stutter in the documentation or it was only there so the programmer could use a naked return statement. (Naked returns should not be used except in very small functions) This change is a manual audit & cleanup of public func signatures. Signatures were not changed if: * the func was private (wouldn't be in public godoc) * the documentation referenced it * the named return value was an interesting name. (i.e. it wasn't simply stutter, repeating the name of the type) There should be no changes in behavior. (At least: none intended) Change-Id: I3472ef49619678fe786e5e0994bdf2d9de76d109 Reviewed-on: https://go-review.googlesource.com/20024 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org>
* all: fix typos and spellingMartin Möhrmann2016-02-242-4/+4
| | | | | | | | Change-Id: Icd06d99c42b8299fd931c7da821e1f418684d913 Reviewed-on: https://go-review.googlesource.com/19829 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* all: replace strings.Index with strings.Contains where possibleNathan VanBenschoten2016-02-191-1/+1
| | | | | | | Change-Id: Ia613f1c37bfce800ece0533a5326fca91d99a66a Reviewed-on: https://go-review.googlesource.com/18120 Reviewed-by: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org>
* os/exec: document that examples assume UnixRuss Cox2016-01-061-0/+4
| | | | | | | | Fixes #13693. Change-Id: Ieb89d8a8874ee8c6b304de99dceb07193c26b60e Reviewed-on: https://go-review.googlesource.com/18315 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* os/exec: make Cmd.Output include stderr in ExitErrorBrad Fitzpatrick2015-10-223-4/+186
| | | | | | | | | Change-Id: I3c6649d2f2521ab0843b13308569867d2e5f02da Reviewed-on: https://go-review.googlesource.com/11415 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* os/exec: close read pipe if copy to io.Writer failsRuss Cox2015-07-222-0/+31
| | | | | | | | Fixes #10400. Change-Id: Ic486cb8af4c40660fd1a2e3d10986975acba3f19 Reviewed-on: https://go-review.googlesource.com/12537 Reviewed-by: Ian Lance Taylor <iant@golang.org>
* os/exec: document that Cmd.Wait waits for stdin I/ORuss Cox2015-07-151-0/+4
| | | | | | | | | Fixes #10338. Change-Id: Ib86cb9a6c694b1e442a9957153c7ca38a7d11c3e Reviewed-on: https://go-review.googlesource.com/12232 Reviewed-by: Andrew Gerrand <adg@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* os/exec: fix plan9 buildBrad Fitzpatrick2015-07-142-8/+30
| | | | | | | | | | | | | Fixes build from https://golang.org/cl/12152 Plan 9 lacks syscall.EPIPE. I was misled by api/go1.txt and also forgot to use the trybots. :( Change-Id: I4982fe969ad4a8724090cb03009bfb21780d8aa7 Reviewed-on: https://go-review.googlesource.com/12153 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Rob Pike <r@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* os/exec: ignore pipe write errors when command completes successfullyBrad Fitzpatrick2015-07-142-0/+31
| | | | | | | | Fixes #9173 Change-Id: I83530533db84b07cb88dbf6ec690be48a06a9d7d Reviewed-on: https://go-review.googlesource.com/12152 Reviewed-by: Ian Lance Taylor <iant@golang.org>
* all: link to https instead of httpBrad Fitzpatrick2015-07-112-8/+8
| | | | | | | | | | | | | The one in misc/makerelease/makerelease.go is particularly bad and probably warrants rotating our keys. I didn't update old weekly notes, and reverted some changes involving test code for now, since we're late in the Go 1.5 freeze. Otherwise, the rest are all auto-generated changes, and all manually reviewed. Change-Id: Ia2753576ab5d64826a167d259f48a2f50508792d Reviewed-on: https://go-review.googlesource.com/12048 Reviewed-by: Rob Pike <r@golang.org>
* all: extract "can I exec?" check from tests into internal/testenvRuss Cox2015-06-161-14/+7
| | | | | | | | Change-Id: I7b54be9d8b50b39e01c6be21f310ae9a10404e9d Reviewed-on: https://go-review.googlesource.com/10753 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* all: fix misprints in commentsAinar Garipov2015-06-111-1/+1
| | | | | | | | | | These were found by grepping the comments from the go code and feeding the output to aspell. Change-Id: Id734d6c8d1938ec3c36bd94a4dbbad577e3ad395 Reviewed-on: https://go-review.googlesource.com/10941 Reviewed-by: Aamir Khan <syst3m.w0rm@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* os/exec: Document the fact that Cmd cannot be reused.Benny Siegert2015-04-291-0/+3
| | | | | | | | Update #10305 Change-Id: Iea04758bc200038a1c64457a68100dcdd7f75212 Reviewed-on: https://go-review.googlesource.com/9440 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* os/exec: skip fork test on darwin/arm64David Crawshaw2015-04-131-9/+10
| | | | | | | | Just like darwin/arm. Change-Id: Ia8c912e91259a5073aa3ab2b6509a18aa9a1fce7 Reviewed-on: https://go-review.googlesource.com/8818 Reviewed-by: Minux Ma <minux@golang.org>
* os/exec: post-process lsof output on Android.Hyang-Ah (Hana) Kim2015-03-251-0/+45
| | | | | | | | | | | | | | lsof is used to inspect the open file desciptors in exec_test.go. In order to limit the output of lsof to the tested process, the tests use lsof with the -p option, but the version of lsof in android seems to ignore it. This change adds a post-processing step to filter out irrelevant entries. Fixes golang/go#10206. Change-Id: Ia789b8f5e1e9b95c7b55deac92d0d1fbf3ee74fb Reviewed-on: https://go-review.googlesource.com/8025 Reviewed-by: David Crawshaw <crawshaw@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* bytes, os/exec, strings: fix a few BUG commentsareski2015-03-201-1/+1
| | | | | | | | | Regular expression noteMarker requires the definition of a (who) section when reading note from a sequence of comments. Change-Id: I9635de9b86f00d20ec108097fee4d4a8f76237b2 Reviewed-on: https://go-review.googlesource.com/1952 Reviewed-by: Russ Cox <rsc@golang.org>
* os/exec: disable tests on darwin/armDavid Crawshaw2015-02-261-2/+11
| | | | | | | | | There is only one process under the iOS sandboxd. Change-Id: I21b5528366a0248a034801a717f24c60f0733c5f Reviewed-on: https://go-review.googlesource.com/6101 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* os/exec: tell lsof not to blockKeith Randall2014-11-051-1/+1
| | | | | | | | | | | | | | For some reason lsof is now hanging on my workstation without the -b (avoid blocking in the kernel) option. Adding -b makes the test pass and shouldn't hurt. I don't know how recent the -b option is. If the builders are ok with it, it's probably ok. LGTM=rsc R=golang-codereviews, bradfitz, rsc CC=golang-codereviews https://golang.org/cl/166220043
* os/exec: fix number of expected file descriptors on Plan 9David du Colombier2014-10-201-9/+1
| | | | | | | | | | Since CL 104570043 and 112720043, we are using the nsec system call instead of /dev/bintime on Plan 9. LGTM=rsc R=rsc CC=aram, golang-codereviews https://golang.org/cl/155590043