From 902349bd8c41be24537723d3a3cbb654d205b16c Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Fri, 7 Nov 2003 22:01:41 +0000 Subject: [PATCH] removed; obsoleted by ctxlimit tool git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/branches/SYSCALL_SWITCH@386 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- util-vserver/src/setctxlimit.c | 86 ------------------------------------------ 1 file changed, 86 deletions(-) delete mode 100644 util-vserver/src/setctxlimit.c diff --git a/util-vserver/src/setctxlimit.c b/util-vserver/src/setctxlimit.c deleted file mode 100644 index 499e691..0000000 --- a/util-vserver/src/setctxlimit.c +++ /dev/null @@ -1,86 +0,0 @@ -// $Id$ - -// Copyright (C) 2003 Enrico Scholz -// based on setctxlimit.cc by Jacques Gelinas -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2, or (at your option) -// any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -/* - Set the global per context limit of a resource (memory, file handle). - This utility can do it either for the current context or a selected - one. - - It uses the same options as ulimit, when possible -*/ -#include -#include -#include -#include -#include - -#include "vserver.h" - -static void set_ctxlim (int res, long lim, const char *msg) -{ - if (call_set_ctxlimit(res,lim)==-1){ - fprintf (stderr,"Error setting limit \"%s\": %s\n" - ,msg,strerror(errno)); - exit (-1); - } -} - -static void usage() -{ - fprintf (stderr,"setctxlimit version %s\n",VERSION); - fprintf (stderr - ,"setctxlimit [ --ctx context ] limits\n" - "\n" - "-n nax opened files\n"); -} - -int main (int argc, char *argv[]) -{ - int ret = -1; - if (argc < 2){ - usage(); - }else{ - int i; - ret = 0; - for (i=1; i