~sircmpwn/ctools

cc69324393fda9bcbc73d30d1bda022263f012a8 — Gabor Koszegi 8 months ago b236872
Correct tee SIGINT test
1 files changed, 6 insertions(+), 3 deletions(-)

M test/tee
M test/tee => test/tee +6 -3
@@ 34,7 34,8 @@ should_handle_sigint() (
	tee </dev/urandom >/dev/null &
	sleep 1
	ps -o pid= 2>&1 | grep $!
	[ $? -eq 0 ] && kill -s INT $!
	[ $? -eq 0 ] || return 1
	kill -s INT $!
	ps -o pid= 2>&1 | grep $!
	[ $? -ne 0 ]
)


@@ 44,9 45,11 @@ should_handle_i_flag() (
	tee -i </dev/urandom >/dev/null &
	sleep 1
	ps -o pid= 2>&1 | grep $!
	[ $? -eq 0 ] && kill -s INT $!
	[ $? -eq 0 ] || return 1
	kill -s INT $!
	ps -o pid= 2>&1 | grep $!
	[ $? -eq 0 ] && kill -s TERM $!
	[ $? -eq 0 ] || return 1
	kill -s TERM $!
	ps -o pid= 2>&1 | grep $!
	[ $? -ne 0 ]
)