From 13b2b090165b7d1826b228817447204c16804e56 Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Thu, 16 Oct 2003 13:59:56 +0000 Subject: [PATCH] cleanups recognize pid==0 as current pid git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@173 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- util-vserver/lib/getctx.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/util-vserver/lib/getctx.c b/util-vserver/lib/getctx.c index 20b687c..90bbb83 100644 --- a/util-vserver/lib/getctx.c +++ b/util-vserver/lib/getctx.c @@ -20,8 +20,6 @@ # include #endif #include "compat.h" -#include "vserver.h" -#include "vserver-internal.h" #ifdef VC_ENABLE_API_COMPAT # include "getctx-compat.hc" @@ -31,11 +29,18 @@ # include "getctx-legacy.hc" #endif +#include "vserver.h" +#include "vserver-internal.h" +#include "internal.h" + +#include #include ctx_t vc_X_getctx(pid_t pid) { + if (pid==0) pid=getpid(); + CALL_VC(CALL_VC_COMPAT(vc_X_getctx, pid), CALL_VC_LEGACY(vc_X_getctx, pid)); } -- 1.8.1.5