drop RLIMIT_LOCKS completely, it was for early Linux 2.4 versions only
This commit is contained in:
parent
61886de5ee
commit
44a58fb3e9
14
funcs.c
14
funcs.c
@ -38,7 +38,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#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
|
#if HAVE_KILLPG
|
||||||
/*
|
/*
|
||||||
@ -3426,9 +3426,6 @@ c_ulimit(const char **wp)
|
|||||||
#ifdef RLIMIT_SWAP
|
#ifdef RLIMIT_SWAP
|
||||||
{ "swap(KiB)", RLIMIT_SWAP, 1024, 'w' },
|
{ "swap(KiB)", RLIMIT_SWAP, 1024, 'w' },
|
||||||
#endif
|
#endif
|
||||||
#ifdef RLIMIT_LOCKS
|
|
||||||
{ "flocks", RLIMIT_LOCKS, -1, 'L' },
|
|
||||||
#endif
|
|
||||||
#ifdef RLIMIT_TIME
|
#ifdef RLIMIT_TIME
|
||||||
{ "humantime(seconds)", RLIMIT_TIME, 1, 'T' },
|
{ "humantime(seconds)", RLIMIT_TIME, 1, 'T' },
|
||||||
#endif
|
#endif
|
||||||
@ -3497,9 +3494,6 @@ c_ulimit(const char **wp)
|
|||||||
#ifdef RLIMIT_SIGPENDING
|
#ifdef RLIMIT_SIGPENDING
|
||||||
"i"
|
"i"
|
||||||
#endif
|
#endif
|
||||||
#ifdef RLIMIT_LOCKS
|
|
||||||
"L"
|
|
||||||
#endif
|
|
||||||
#ifdef RLIMIT_MEMLOCK
|
#ifdef RLIMIT_MEMLOCK
|
||||||
"l"
|
"l"
|
||||||
#endif
|
#endif
|
||||||
@ -3619,7 +3613,11 @@ set_ulimit(const struct limits *l, const char *v, int how)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (getrlimit(l->resource, &limit) < 0) {
|
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_cur = RLIM_INFINITY;
|
||||||
limit.rlim_max = RLIM_INFINITY;
|
limit.rlim_max = RLIM_INFINITY;
|
||||||
}
|
}
|
||||||
|
8
mksh.1
8
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 $
|
.\" $OpenBSD: ksh.1,v 1.148 2013/09/04 15:49:18 millert Exp $
|
||||||
.\"-
|
.\"-
|
||||||
.\" Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
.\" Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
||||||
@ -74,7 +74,7 @@
|
|||||||
.\" with -mandoc, it might implement .Mx itself, but we want to
|
.\" with -mandoc, it might implement .Mx itself, but we want to
|
||||||
.\" use our own definition. And .Dd must come *first*, always.
|
.\" 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.
|
.\" 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
|
.Pp
|
||||||
.It Xo
|
.It Xo
|
||||||
.Ic ulimit
|
.Ic ulimit
|
||||||
.Op Fl aBCcdefHiLlMmnOPpqrSsTtVvw
|
.Op Fl aBCcdefHilMmnOPpqrSsTtVvw
|
||||||
.Op Ar value
|
.Op Ar value
|
||||||
.Xc
|
.Xc
|
||||||
Display or set process limits.
|
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
|
.It Fl i Ar n
|
||||||
Set the number of pending signals to
|
Set the number of pending signals to
|
||||||
.Ar n .
|
.Ar n .
|
||||||
.It Fl L Ar n
|
|
||||||
Control flocks; documentation is missing.
|
|
||||||
.It Fl l Ar n
|
.It Fl l Ar n
|
||||||
Impose a limit of
|
Impose a limit of
|
||||||
.Ar n
|
.Ar n
|
||||||
|
Loading…
x
Reference in New Issue
Block a user