From: Gurucharan Shetty Date: Tue, 17 Jun 2014 19:35:32 +0000 (-0700) Subject: ovs-vsctl.at: Workaround lack of 'kill -l' on Windows. X-Git-Tag: v2.4.0~1874 X-Git-Url: http://git.cascardo.eti.br/?a=commitdiff_plain;h=9e784ba5c90fbfc4db5f36392d9c42322696177e;p=cascardo%2Fovs.git ovs-vsctl.at: Workaround lack of 'kill -l' on Windows. Also, fflush(stderr) when we raise a signal. The test this commit is changing would fail otherwise. Signed-off-by: Gurucharan Shetty Acked-by: Ben Pfaff --- diff --git a/lib/fatal-signal.c b/lib/fatal-signal.c index ebafc9012..eff007d12 100644 --- a/lib/fatal-signal.c +++ b/lib/fatal-signal.c @@ -199,6 +199,7 @@ fatal_signal_run(void) VLOG_WARN("terminating with signal %d", (int)sig_nr); #endif call_hooks(sig_nr); + fflush(stderr); /* Re-raise the signal with the default handling so that the program * termination status reflects that we were killed by this signal */ diff --git a/tests/ovs-vsctl.at b/tests/ovs-vsctl.at index f27ffbd8a..135f76834 100644 --- a/tests/ovs-vsctl.at +++ b/tests/ovs-vsctl.at @@ -159,8 +159,14 @@ AT_CHECK( [0], [], [stderr]) AT_CHECK([grep -c 'terminating with signal' stderr], [0], [1 ]) -AT_CHECK([kill -l `cat status`], [0], [ALRM +if test "$IS_WIN32" = "yes"; then + AT_CHECK([cat status], [0], [3 ]) +else + # 128 + SIGALRM + AT_CHECK([cat status], [0], [142 +]) +fi dnl Without --retry, we should retry for passive connections. AT_CHECK( @@ -169,8 +175,14 @@ AT_CHECK( [0], [], [stderr]) AT_CHECK([grep -c 'terminating with signal' stderr], [0], [1 ]) -AT_CHECK([kill -l `cat status`], [0], [ALRM +if test "$IS_WIN32" = "yes"; then + AT_CHECK([cat status], [0], [3 +]) +else + # 128 + SIGALRM + AT_CHECK([cat status], [0], [142 ]) +fi AT_CLEANUP dnl ----------------------------------------------------------------------