Try to figure out the xid if not specified.
authorDaniel Hokka Zakrisson <daniel@hozac.com>
Mon, 5 Feb 2007 20:40:22 +0000 (20:40 +0000)
committerDaniel Hokka Zakrisson <daniel@hozac.com>
Mon, 5 Feb 2007 20:40:22 +0000 (20:40 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2489 94cd875c-1c1d-0410-91d2-eb244daf1a30

src/vkill.c

index 489046f..02a8dc4 100644 (file)
@@ -154,6 +154,8 @@ kill_wrapper(xid_t xid, char const *pid, int sig)
 inline static int
 kill_wrapper(xid_t xid, char const *pid, int sig)
 {
+  if (xid==VC_NOCTX)
+    xid = vc_get_task_xid(pid);
   if (vc_ctx_kill(xid,atoi(pid),sig)==-1) {
     perror("vkill: vc_ctx_kill()");
     return 1;