On Thu, Jun 02, 2016 at 06:41:23PM -0700, Joe Stringer wrote: > On the other hand, if that command returned effectively an empty > string, then I'd expect the kill command would become something like > "kill -0", which should print the usage and return a non-zero exit > code.
That's what happens on a POSIX system, but for Windows, in tests/ovs-macros.at, we have a "kill"-emulating shell function that fails to faithfully reproduce that behavior: kill () { signal= retval=0 for arg; do case $arg in -*) signal=$arg ;; [1-9][0-9]*) # tasklist always returns 0. # If pid does exist, there will be a line with the pid. if tasklist //fi "PID eq $arg" | grep $arg >/dev/null; then if test "X$signal" != "X-0"; then tskill $arg fi else retval=1 fi ;; esac done return $retval Perhaps we should add something like: if test $# = 0; then echo >&2 "kill: usage: kill [-signum] pid..." return 1 fi > Because the exit code is nonzero, the OVS_WAIT_WHILE should exit > immediately, so the test should continue. But this doesn't seem to be > the behaviour on windows? Maybe one of my assumptions here is a bit > off. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev