Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 707 Bytes

README.md

File metadata and controls

28 lines (19 loc) · 707 Bytes

cmd-test

Test repository to demonstrate blocking behavior with exec methods while using stdin.

First compile the C code.

cd c
gcc seg.c -o seg
cd ..

After that you can compile and run the two Go code examples.

go-cmd

Demonstrates blocking behaviour of StartWithStdin() from go-cmd.

cd gocmd
go build
./gocmd

The result will be that the Go code keeps blocking on state := <-statusChan.

exec

Demonstrates blocking behaviour of StdinPipe from the exec standard library package.

cd exec
go build
./exec

The result will be that the Go code will unblock as soon as the seg executable finishes.