Standard library / os/exec

os/exec.ErrWaitDelay

May be returned when a successful process exits but its output pipes remain open beyond a configured nonzero WaitDelay. It is not a general command timeout error. Example intended for Linux/AMD64 with Go 1.23.2 in a disposable working directory; other platforms may differ. Expected stdout: 'true\n'.

Formal Syntax & Structure

go syntaxgo
var ErrWaitDelay error

Working Example

Example Snippetgo
package main
import (  "errors"  "fmt"  "os/exec")
func must(e error) {  if e != nil {    panic(e)  }}func main() {  e := fmt.Errorf("child I/O: %w", exec.ErrWaitDelay)  fmt.Println(errors.Is(e, exec.ErrWaitDelay))}
Go Reference