From 482c422f8e8ec517de071266d425b425c4628103 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sat, 25 Aug 2018 15:32:22 -0500 Subject: Convert more argument variables in GLOBALS() to new style. --- toys/posix/ulimit.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'toys/posix/ulimit.c') diff --git a/toys/posix/ulimit.c b/toys/posix/ulimit.c index 0aedd2cc..4fa01618 100644 --- a/toys/posix/ulimit.c +++ b/toys/posix/ulimit.c @@ -17,6 +17,7 @@ * runtime). We support -P to affect processes other than us. USE_ULIMIT(NEWTOY(ulimit, ">1P#<1SHavutsrRqpnmlifedc[-SH][!apvutsrRqnmlifedc]", TOYFLAG_USR|TOYFLAG_BIN)) +USE_ULIMIT(OLDTOY(prlimit, ulimit, TOYFLAG_USR|TOYFLAG_BIN)) config ULIMIT bool "ulimit" @@ -45,7 +46,7 @@ config ULIMIT #include "toys.h" GLOBALS( - long pid; + long P; ) // This is a linux kernel syscall added in 2.6.36 (git c022a0acad53) which @@ -70,14 +71,14 @@ void ulimit_main(void) if ((toys.optflags&(FLAG_a|FLAG_p)) && toys.optc) error_exit("can't set -ap"); // Fetch data - if (!(toys.optflags&FLAG_P)) TT.pid = getppid(); + if (!(toys.optflags&FLAG_P)) TT.P = getppid(); for (i=0; i