<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go/src/os/exec/exec.go, branch makepkg</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=makepkg</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=makepkg'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2026-01-27T20:28:35Z</updated>
<entry>
<title>os/exec: document blocking Stdin/Stdout/Stderr</title>
<updated>2026-01-27T20:28:35Z</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2026-01-27T04:03:30Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=251f3aa6ee6fc3925fe8e64cd4b403bfa73b93ab'/>
<id>urn:sha1:251f3aa6ee6fc3925fe8e64cd4b403bfa73b93ab</id>
<content type='text'>
WaitDelay only handles writes to Stdin and reads from Stdout/Stderr.
If Stdin is set to a blocking Reader, or Stdout/Stderr are set to
a blocking Writer, Wait can hang indefinitely. I don't see any way to
fix this with the current API, as there is no general way that the
os/exec package can interrupt the blocking Read or Write.

This CL documents the limitation and points people toward the
workaround of using StdinPipe/StdoutPipe/StderrPipe and arranging
for their own way to interrupt the blocking Read or Write.

Fixes #77227

Change-Id: I3150ae7af89dccf8d859b41eb43eaf0bbbb55fee
Reviewed-on: https://go-review.googlesource.com/c/go/+/739422
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Sean Liao &lt;sean@liao.dev&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Carlos Amedee &lt;carlos@golang.org&gt;
</content>
</entry>
<entry>
<title>os/exec: avoid atomic.Bool for Cmd.startCalled</title>
<updated>2026-01-06T20:26:39Z</updated>
<author>
<name>Alan Donovan</name>
<email>adonovan@google.com</email>
</author>
<published>2026-01-06T19:48:31Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=d1d0fc7a97539206e33f04bac935f6450597137c'/>
<id>urn:sha1:d1d0fc7a97539206e33f04bac935f6450597137c</id>
<content type='text'>
An atomic.Bool isn't necessary here since, unless otherwise
specified, the methods of an object are not concurrency-safe
w.r.t. each other. Using an atomic causes the copylocks vet
check to warn about copying of Cmd, which is not wrong, because
one shouldn't be copying opaque complex structs from other
packages, but it is a nuisance in the absence of any safe way
to copy a Cmd.

If and when we add a Clone method to Cmd (see #77075) then
it would be appropriate to revert this change so that we get
the benefit of the static check (though ideally we would make
a more explicit tool-readable declaration of the "do not copy"
attribute than merely happening to use an atomic.Bool).

For #77075

Change-Id: I982d4e86623ca165a3e76bbf648fd44041d5f6bb
Reviewed-on: https://go-review.googlesource.com/c/go/+/734200
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
</content>
</entry>
<entry>
<title>os/exec: second call to Cmd.Start is always an error</title>
<updated>2025-12-22T18:43:07Z</updated>
<author>
<name>Alan Donovan</name>
<email>adonovan@google.com</email>
</author>
<published>2025-12-09T15:06:23Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=3d77a0b15ea2a6d2f7b3e2ba483f148d7c6ee174'/>
<id>urn:sha1:3d77a0b15ea2a6d2f7b3e2ba483f148d7c6ee174</id>
<content type='text'>
Previously it would return an error only if the first call
resulted in process creation, contra the intent of the
comment at exec.Cmd:

// A Cmd cannot be reused after calling its [Cmd.Start], [Cmd.Run],
// [Cmd.Output], or [Cmd.CombinedOutput] methods.

Also, clear the Cmd.goroutines slice in case of failure to
start a process, so that the closures can be GC'd and their
pipe fds finalized and closed.

Fixes #76746

Change-Id: Ic63a4dced0aa52c2d4be7d44f6dcfc84ee22282c
Reviewed-on: https://go-review.googlesource.com/c/go/+/728642
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
</content>
</entry>
<entry>
<title>os/exec: include Cmd.Start in the list of methods that run Cmd</title>
<updated>2025-11-12T15:27:58Z</updated>
<author>
<name>Sean Liao</name>
<email>sean@liao.dev</email>
</author>
<published>2025-11-11T21:08:26Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=65858a146e585b74d41db63f3821d6a150f36d49'/>
<id>urn:sha1:65858a146e585b74d41db63f3821d6a150f36d49</id>
<content type='text'>
Fixes #76265

Change-Id: I451271c5662dd3bcdeec07b55761b15f64c00dcd
Reviewed-on: https://go-review.googlesource.com/c/go/+/719860
Reviewed-by: Keith Randall &lt;khr@golang.org&gt;
Reviewed-by: Alan Donovan &lt;adonovan@google.com&gt;
Auto-Submit: Keith Randall &lt;khr@golang.org&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Keith Randall &lt;khr@google.com&gt;
</content>
</entry>
<entry>
<title>os/exec: fix incorrect expansion of "", "." and ".." in LookPath</title>
<updated>2025-07-29T20:53:57Z</updated>
<author>
<name>Olivier Mengué</name>
<email>olivier.mengue@gmail.com</email>
</author>
<published>2025-06-30T14:58:59Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=e0b07dc22eaab1b003d98ad6d63cdfacc76c5c70'/>
<id>urn:sha1:e0b07dc22eaab1b003d98ad6d63cdfacc76c5c70</id>
<content type='text'>
Fix incorrect expansion of "" and "." when $PATH contains an executable
file or, on Windows, a parent directory of a %PATH% element contains an
file with the same name as the %PATH% element but with one of the
%PATHEXT% extension (ex: C:\utils\bin is in PATH, and C:\utils\bin.exe
exists).

Fix incorrect expansion of ".." when $PATH contains an element which is
an the concatenation of the path to an executable file (or on Windows
a path that can be expanded to an executable by appending a %PATHEXT%
extension), a path separator and a name.

"", "." and ".." are now rejected early with ErrNotFound.

Fixes CVE-2025-47906
Fixes #74466

Change-Id: Ie50cc0a660fce8fbdc952a7f2e05c36062dcb50e
Reviewed-on: https://go-review.googlesource.com/c/go/+/685755
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Auto-Submit: Damien Neil &lt;dneil@google.com&gt;
Reviewed-by: Roland Shoemaker &lt;roland@golang.org&gt;
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
</content>
</entry>
<entry>
<title>all: replace a few user-visible mentions of golang.org and godoc.org</title>
<updated>2025-06-13T06:27:10Z</updated>
<author>
<name>Alberto Donizetti</name>
<email>alb.donizetti@gmail.com</email>
</author>
<published>2025-06-12T08:19:28Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=9149876112facc113d77d2c65e1590184c57d0c2'/>
<id>urn:sha1:9149876112facc113d77d2c65e1590184c57d0c2</id>
<content type='text'>
This change replaces a few user-visible mentions of golang.org and
godoc.org with go.dev and pkg.go.dev, respectively. Non-user-visible
mentions (e.g. in test scripts) were left untouched.

Change-Id: I5d828edcd618b6c55243d0dfcadc6fa1ce9422ce
Reviewed-on: https://go-review.googlesource.com/c/go/+/681255
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
</content>
</entry>
<entry>
<title>os/exec: edit comment to remove invalid link</title>
<updated>2024-11-27T15:22:17Z</updated>
<author>
<name>Adam Bender</name>
<email>abender@gmail.com</email>
</author>
<published>2024-11-26T01:52:25Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=7e0950861703c93ea3e7f122c1c594851919261e'/>
<id>urn:sha1:7e0950861703c93ea3e7f122c1c594851919261e</id>
<content type='text'>
Update comment to remove link formatting that doesn't turn into a link, because the target field is not a top-level member of the package. Re-word comment slightly.

Change-Id: I43ebd8fb105b772a4362c0c763e6464321a92747
Reviewed-on: https://go-review.googlesource.com/c/go/+/631856
Reviewed-by: Veronica Silina &lt;veronicasilina@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
</content>
</entry>
<entry>
<title>os/exec: document interaction of Dir, PWD, os.Getwd and C</title>
<updated>2024-08-29T18:03:48Z</updated>
<author>
<name>Alan Donovan</name>
<email>adonovan@google.com</email>
</author>
<published>2024-08-28T22:13:05Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=00c48ad6155a209841dbfb6154f650c622aaa10b'/>
<id>urn:sha1:00c48ad6155a209841dbfb6154f650c622aaa10b</id>
<content type='text'>
Fixes #68000

Change-Id: Ie70a8ecc9573b2a4cf57119bda57e0af5e16c42f
Reviewed-on: https://go-review.googlesource.com/c/go/+/609395
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
</content>
</entry>
<entry>
<title>os/exec: only use cachedLookExtensions if Cmd.Path is unmodified</title>
<updated>2024-07-07T16:40:57Z</updated>
<author>
<name>Dmitri Shuralyov</name>
<email>dmitshur@golang.org</email>
</author>
<published>2024-07-04T22:07:45Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=d0146bd85bb6870aa43a498b06ccb473af55cbe3'/>
<id>urn:sha1:d0146bd85bb6870aa43a498b06ccb473af55cbe3</id>
<content type='text'>
Caching the invocation of lookExtensions on an absolute path in Command
and reusing the cached result in Start is only viable if Cmd.Path isn't
set to a different value after Command returns.

For #66586.
Fixes #68314.

Change-Id: I57007850aca2011b11344180c00faded737617b5
Reviewed-on: https://go-review.googlesource.com/c/go/+/596875
Reviewed-by: qiu laidongfeng2 &lt;2645477756@qq.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Auto-Submit: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
</content>
</entry>
<entry>
<title>os/exec: on Windows look for extensions in Run if not already done</title>
<updated>2024-06-07T20:13:53Z</updated>
<author>
<name>qiulaidongfeng</name>
<email>2645477756@qq.com</email>
</author>
<published>2024-06-05T19:06:31Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=5532427c4b1c5e962ad5484258be0071bd270e53'/>
<id>urn:sha1:5532427c4b1c5e962ad5484258be0071bd270e53</id>
<content type='text'>
CL 512155 fixed #36768, but introduced #62596.
CL 527820 fixed #62596, but meant that the code failed to look up
file extensions on Windows for a relative path.
This CL fixes that problem by recording whether it has already
looked up file extensions.
This does mean that if Path is set manually then we do not update
it with file extensions, as doing that would be racy.

Fixes #66586

Change-Id: I9a0305d1e466c5e07bfbe442566ea12f5255a96e
GitHub-Last-Rev: dc3169f2350f61acac5ef7842b7514013abacbe1
GitHub-Pull-Request: golang/go#67035
Reviewed-on: https://go-review.googlesource.com/c/go/+/581695
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
</content>
</entry>
</feed>
