testsuite.at: kill for windows.
authorGurucharan Shetty <gshetty@nicira.com>
Fri, 18 Apr 2014 15:24:42 +0000 (08:24 -0700)
committerGurucharan Shetty <gshetty@nicira.com>
Tue, 22 Apr 2014 22:20:43 +0000 (15:20 -0700)
commitb3c3eec7195a86e343b58e52601c5ab676e07a0b
tree9dda84213a043afeba74f974df4bf47d07b6528e
parent038b21a100dd346a7e1fbf833284e1d58949e7cb
testsuite.at: kill for windows.

We use kill to cleanup processes from pidfiles.
Windows has a 'taskkill' which does something similar.
We can check if the process with a PID exists with
'tasklist'. Both tasklist and taskkill return 0 for
both success and failure. So, we will have to grep
to see if there is a o/p.

A typical o/p of tasklist is:
$ tasklist | grep ovs
ovsdb-server.exe              3228 RDP-Tcp#0                  2      6,132 K
ovs-vswitchd.exe              2080 RDP-Tcp#0                  2      5,808 K

$ tasklist //fi "PID eq 3228"

Image Name                     PID Session Name        Session#    Mem Usage
========================= ======== ================ =========== ============
ovsdb-server.exe              3228 RDP-Tcp#0                  2      6,132 K

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
tests/testsuite.at