~sircmpwn/ctools

Correct tee SIGINT test v2 PROPOSED

Gabor Koszegi
Gabor Koszegi: 1
 Correct tee SIGINT test

 1 files changed, 6 insertions(+), 3 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/ctools/patches/8998/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH v2] Correct tee SIGINT test Export this patch

Gabor Koszegi
---
The previous version didn't cover both of the SIGINT related tests.

 test/tee | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/test/tee b/test/tee
index dd7497f..dbab3d6 100755
--- a/test/tee
+++ b/test/tee
@@ -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 ]
)
-- 
2.22.0
Thanks!

To git.sr.ht:~sircmpwn/ctools
   b236872..cc69324  master -> master