Haiku-related ulimit overhaul:
• print ulimit -a with the flag, like most other shells do • move ulimit-1 regression test to ulimit-2 and exclude on Haiku: it can only set the -n and -V limits AFAICT • document that some OSes (here: Haiku) can only set the soft limits (so “ulimit -nS 1024” is okay but -S is required) • check “ulimit -c 0”, which dot.mkshrc uses, everywhere (if it errors out, hack around it or stub it out with MKSH_NO_LIMITS)
This commit is contained in:
11
check.t
11
check.t
@@ -1,4 +1,4 @@
|
|||||||
# $MirOS: src/bin/mksh/check.t,v 1.760 2017/03/17 22:45:48 tg Exp $
|
# $MirOS: src/bin/mksh/check.t,v 1.761 2017/03/19 18:05:25 tg Exp $
|
||||||
# -*- mode: sh -*-
|
# -*- mode: sh -*-
|
||||||
#-
|
#-
|
||||||
# Copyright © 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
# Copyright © 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||||
@@ -10224,9 +10224,16 @@ expected-stdout:
|
|||||||
set -U
|
set -U
|
||||||
print 'a\0b€c' >x
|
print 'a\0b€c' >x
|
||||||
read -a y <x
|
read -a y <x
|
||||||
|
set +U
|
||||||
|
typeset -Uui16 y
|
||||||
|
print ${y[*]} .
|
||||||
|
expected-stdout:
|
||||||
|
16#61 16#0 16#62 16#20AC 16#63 .
|
||||||
|
---
|
||||||
name: ulimit-1
|
name: ulimit-1
|
||||||
description:
|
description:
|
||||||
print ${y[*]} .
|
Check that ulimit as used in dot.mksh works or is stubbed
|
||||||
|
stdin:
|
||||||
ulimit -c 0
|
ulimit -c 0
|
||||||
---
|
---
|
||||||
name: ulimit-2
|
name: ulimit-2
|
||||||
|
4
funcs.c
4
funcs.c
@@ -38,7 +38,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.328 2017/03/17 22:45:50 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.329 2017/03/19 18:05:28 tg Exp $");
|
||||||
|
|
||||||
#if HAVE_KILLPG
|
#if HAVE_KILLPG
|
||||||
/*
|
/*
|
||||||
@@ -3655,7 +3655,7 @@ c_ulimit(const char **wp)
|
|||||||
if (!all)
|
if (!all)
|
||||||
print_ulimit(rlimits[i], how);
|
print_ulimit(rlimits[i], how);
|
||||||
else for (i = 0; i < NELEM(rlimits); ++i) {
|
else for (i = 0; i < NELEM(rlimits); ++i) {
|
||||||
shprintf("%-20s ", rlimits[i]->name);
|
shprintf("-%c: %-20s ", rlimits[i]->optchar, rlimits[i]->name);
|
||||||
print_ulimit(rlimits[i], how);
|
print_ulimit(rlimits[i], how);
|
||||||
}
|
}
|
||||||
return (0);
|
return (0);
|
||||||
|
4
mksh.1
4
mksh.1
@@ -1,4 +1,4 @@
|
|||||||
.\" $MirOS: src/bin/mksh/mksh.1,v 1.430 2017/03/19 16:48:51 tg Exp $
|
.\" $MirOS: src/bin/mksh/mksh.1,v 1.431 2017/03/19 18:05:29 tg Exp $
|
||||||
.\" $OpenBSD: ksh.1,v 1.160 2015/07/04 13:27:04 feinerer Exp $
|
.\" $OpenBSD: ksh.1,v 1.160 2015/07/04 13:27:04 feinerer Exp $
|
||||||
.\"-
|
.\"-
|
||||||
.\" Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
.\" Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
||||||
@@ -5030,7 +5030,7 @@ once they are set.
|
|||||||
Also note that the types of limits available are system
|
Also note that the types of limits available are system
|
||||||
dependent \*(en some systems have only the
|
dependent \*(en some systems have only the
|
||||||
.Fl f
|
.Fl f
|
||||||
limit.
|
limit, or not even that, or can set only the soft limits
|
||||||
.Bl -tag -width 5n
|
.Bl -tag -width 5n
|
||||||
.It Fl a
|
.It Fl a
|
||||||
Display all limits; unless
|
Display all limits; unless
|
||||||
|
Reference in New Issue
Block a user