From 44a58fb3e9717e3f3f0b8030fc717b96516b9a08 Mon Sep 17 00:00:00 2001 From: tg Date: Sun, 17 Nov 2013 22:20:21 +0000 Subject: [PATCH] drop RLIMIT_LOCKS completely, it was for early Linux 2.4 versions only --- funcs.c | 14 ++++++-------- mksh.1 | 8 +++----- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/funcs.c b/funcs.c index 6956fdb..49718ea 100644 --- a/funcs.c +++ b/funcs.c @@ -38,7 +38,7 @@ #endif #endif -__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.248 2013/11/17 22:19:41 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.249 2013/11/17 22:20:20 tg Exp $"); #if HAVE_KILLPG /* @@ -3426,9 +3426,6 @@ c_ulimit(const char **wp) #ifdef RLIMIT_SWAP { "swap(KiB)", RLIMIT_SWAP, 1024, 'w' }, #endif -#ifdef RLIMIT_LOCKS - { "flocks", RLIMIT_LOCKS, -1, 'L' }, -#endif #ifdef RLIMIT_TIME { "humantime(seconds)", RLIMIT_TIME, 1, 'T' }, #endif @@ -3497,9 +3494,6 @@ c_ulimit(const char **wp) #ifdef RLIMIT_SIGPENDING "i" #endif -#ifdef RLIMIT_LOCKS - "L" -#endif #ifdef RLIMIT_MEMLOCK "l" #endif @@ -3619,7 +3613,11 @@ set_ulimit(const struct limits *l, const char *v, int how) } if (getrlimit(l->resource, &limit) < 0) { - /* some can't be read, e.g. Linux RLIMIT_LOCKS */ +#ifndef MKSH_SMALL + bi_errorf("limit %s could not be read, contact the mksh developers: %s", + l->name, cstrerror(errno)); +#endif + /* some can't be read */ limit.rlim_cur = RLIM_INFINITY; limit.rlim_max = RLIM_INFINITY; } diff --git a/mksh.1 b/mksh.1 index db17f78..da07000 100644 --- a/mksh.1 +++ b/mksh.1 @@ -1,4 +1,4 @@ -.\" $MirOS: src/bin/mksh/mksh.1,v 1.322 2013/09/10 17:33:02 tg Exp $ +.\" $MirOS: src/bin/mksh/mksh.1,v 1.323 2013/11/17 22:20:21 tg Exp $ .\" $OpenBSD: ksh.1,v 1.148 2013/09/04 15:49:18 millert Exp $ .\"- .\" Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, @@ -74,7 +74,7 @@ .\" with -mandoc, it might implement .Mx itself, but we want to .\" use our own definition. And .Dd must come *first*, always. .\" -.Dd $Mdocdate: September 10 2013 $ +.Dd $Mdocdate: November 17 2013 $ .\" .\" Check which macro package we use, and do other -mdoc setup. .\" @@ -4895,7 +4895,7 @@ unless they are also given on the same command line. .Pp .It Xo .Ic ulimit -.Op Fl aBCcdefHiLlMmnOPpqrSsTtVvw +.Op Fl aBCcdefHilMmnOPpqrSsTtVvw .Op Ar value .Xc Display or set process limits. @@ -4946,8 +4946,6 @@ Set the hard limit only (the default is to set both hard and soft limits). .It Fl i Ar n Set the number of pending signals to .Ar n . -.It Fl L Ar n -Control flocks; documentation is missing. .It Fl l Ar n Impose a limit of .Ar n