summaryrefslogtreecommitdiff
path: root/test/clos1way2.awk
blob: c734c142fc84d233d40fba6e508b7cf7966a8369 (plain)
1
2
3
4
5
6
7
{
	# We use "&&" and not ";" so it works with Windows shells as well.
	cmd = "cat - 1>&2 && sleep 2"
	print |& cmd; close(cmd, "to")
	fflush(cmd)
	print |& cmd; print ERRNO
}