07-exec_CommandContext_using_channels_for_sub_shell

command
v0.0.0-...-9882766 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

When using exec.CommandContext and executing a command with "bash -c" it seems that the timeout of of the context do not cancel the command with the godoc example by just defering the cancel. Instead by checking for the ctx.Done we can call cancel() when the timeout is reached.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL