Add MKSH_NO_LIMITS, to define which has the same effect as the
absence of RLIM_INFINITY, namely make c_ulimit() into a true
This commit is contained in:
parent
571546c562
commit
632ddd50a7
3
Build.sh
3
Build.sh
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.400 2009/06/08 20:34:37 tg Exp $'
|
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.401 2009/06/08 20:52:28 tg Stab $'
|
||||||
#-
|
#-
|
||||||
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||||
# Thorsten Glaser <tg@mirbsd.org>
|
# Thorsten Glaser <tg@mirbsd.org>
|
||||||
@ -24,6 +24,7 @@ srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.400 2009/06/08 20:34:37 tg Exp $'
|
|||||||
# CPPFLAGS recognised: MKSH_SMALL MKSH_ASSUME_UTF8 MKSH_NOPWNAM MKSH_NOVI
|
# CPPFLAGS recognised: MKSH_SMALL MKSH_ASSUME_UTF8 MKSH_NOPWNAM MKSH_NOVI
|
||||||
# MKSH_CLS_STRING MKSH_BINSHREDUCED MKSH_UNEMPLOYED
|
# MKSH_CLS_STRING MKSH_BINSHREDUCED MKSH_UNEMPLOYED
|
||||||
# MKSH_CONSERVATIVE_FDS MKSH_MIDNIGHTBSD01ASH_COMPAT
|
# MKSH_CONSERVATIVE_FDS MKSH_MIDNIGHTBSD01ASH_COMPAT
|
||||||
|
# MKSH_NO_LIMITS
|
||||||
|
|
||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
export LC_ALL
|
export LC_ALL
|
||||||
|
12
funcs.c
12
funcs.c
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.111 2009/06/08 20:34:39 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.112 2009/06/08 20:52:27 tg Exp $");
|
||||||
|
|
||||||
#if HAVE_KILLPG
|
#if HAVE_KILLPG
|
||||||
/*
|
/*
|
||||||
@ -38,6 +38,10 @@ __RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.111 2009/06/08 20:34:39 tg Exp $");
|
|||||||
#define mksh_kill kill
|
#define mksh_kill kill
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef RLIM_INFINITY
|
||||||
|
#define MKSH_NO_LIMITS
|
||||||
|
#endif
|
||||||
|
|
||||||
/* A leading = means assignments before command are kept;
|
/* A leading = means assignments before command are kept;
|
||||||
* a leading * means a POSIX special builtin;
|
* a leading * means a POSIX special builtin;
|
||||||
* a leading + means a POSIX regular builtin
|
* a leading + means a POSIX regular builtin
|
||||||
@ -2890,7 +2894,7 @@ ptest_error(Test_env *te, int ofs, const char *msg)
|
|||||||
bi_errorf("%s", msg);
|
bi_errorf("%s", msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef RLIM_INFINITY
|
#ifndef MKSH_NO_LIMITS
|
||||||
#define SOFT 0x1
|
#define SOFT 0x1
|
||||||
#define HARD 0x2
|
#define HARD 0x2
|
||||||
|
|
||||||
@ -2908,7 +2912,7 @@ static int set_ulimit(const struct limits *, const char *, int);
|
|||||||
int
|
int
|
||||||
c_ulimit(const char **wp)
|
c_ulimit(const char **wp)
|
||||||
{
|
{
|
||||||
#ifdef RLIM_INFINITY
|
#ifndef MKSH_NO_LIMITS
|
||||||
static const struct limits limits[] = {
|
static const struct limits limits[] = {
|
||||||
/* do not use options -H, -S or -a or change the order */
|
/* do not use options -H, -S or -a or change the order */
|
||||||
#ifdef RLIMIT_CPU
|
#ifdef RLIMIT_CPU
|
||||||
@ -3009,7 +3013,7 @@ c_ulimit(const char **wp)
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef RLIM_INFINITY
|
#ifndef MKSH_NO_LIMITS
|
||||||
static int
|
static int
|
||||||
set_ulimit(const struct limits *l, const char *v, int how)
|
set_ulimit(const struct limits *l, const char *v, int how)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user