From 76b2d6afed1e22556bd6c52e74b546eb8bf9a225 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 21 May 2021 12:50:52 -0700 Subject: [PATCH] os: document that StartProcess puts files into blocking mode Fixes #43894 Change-Id: I2add7b8a4f6ae69a5ef1c48703fde21a4b74307c Reviewed-on: https://go-review.googlesource.com/c/go/+/321852 Trust: Ian Lance Taylor Run-TryBot: Ian Lance Taylor TryBot-Result: Go Bot Reviewed-by: Dmitri Shuralyov --- src/os/exec.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/os/exec.go b/src/os/exec.go index edb773a092..bc75d4dd66 100644 --- a/src/os/exec.go +++ b/src/os/exec.go @@ -54,6 +54,9 @@ type ProcAttr struct { // standard error. An implementation may support additional entries, // depending on the underlying operating system. A nil entry corresponds // to that file being closed when the process starts. + // On Unix systems, StartProcess will change these File values + // to blocking mode, which means that SetDeadline will stop working + // and calling Close will not interrupt a Read or Write. Files []*File // Operating system-specific process creation attributes. -- 2.50.0