summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-02-26 03:52:56 +0000
committerLaurent Bercot <ska@appnovation.com>2023-02-26 03:52:56 +0000
commit5ec0b70b9b0cc387287a1eb3e7aef06a42706eae (patch)
treedaf03da8477c8293cf0772667070e813962e8c04
parentfd69f337d8bf6ba3aa1c8418edc07ee899f84eb2 (diff)
downloads6-5ec0b70b9b0cc387287a1eb3e7aef06a42706eae.tar.xz
Prepare for 2.11.3.1, rlimit shenanigans
Signed-off-by: Laurent Bercot <ska@appnovation.com>
-rw-r--r--INSTALL2
-rw-r--r--NEWS6
-rw-r--r--doc/index.html4
-rw-r--r--doc/upgrade.html7
-rw-r--r--package/info2
-rw-r--r--src/daemontools-extras/s6-softlimit.c20
6 files changed, 33 insertions, 8 deletions
diff --git a/INSTALL b/INSTALL
index 76bb31a..238528e 100644
--- a/INSTALL
+++ b/INSTALL
@@ -7,7 +7,7 @@ Build Instructions
- A POSIX-compliant C development environment
- GNU make version 3.81 or later
- skalibs version 2.13.1.0 or later: https://skarnet.org/software/skalibs/
- - execline version 2.9.2.0 or later: https://skarnet.org/software/execline/
+ - execline version 2.9.2.1 or later: https://skarnet.org/software/execline/
(You can disable this requirement at configure time, but will
lose some functionality.)
- Optional: nsss version 0.2.0.3 or later: https://skarnet.org/software/nsss/
diff --git a/NEWS b/NEWS
index 05b5068..a6b8348 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,11 @@
Changelog for s6.
+In 2.11.3.1
+-----------
+
+ - Resource limit shenanigans.
+
+
In 2.11.3.0
-----------
diff --git a/doc/index.html b/doc/index.html
index c6a9204..4d46f0a 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -88,7 +88,7 @@ requirement if you link against the shared version of the skalibs
library. </li>
<li> (Optional, but really recommended for full functionality):
<a href="//skarnet.org/software/execline/">execline</a> version
-2.9.2.0 or later. When s6 is built with execline support (which is the default),
+2.9.2.1 or later. When s6 is built with execline support (which is the default),
execline is a build-time requirement, and also a run-time requirement for
certain binaries that spawn scripts interpreted with
<a href="//skarnet.org/software/execline/execlineb.html">execlineb</a>. </li>
@@ -115,7 +115,7 @@ want nsswitch-like functionality:
<h3> Download </h3>
<ul>
- <li> The current released version of s6 is <a href="s6-2.11.3.0.tar.gz">2.11.3.0</a>. </li>
+ <li> The current released version of s6 is <a href="s6-2.11.3.1.tar.gz">2.11.3.1</a>. </li>
<li> Alternatively, you can checkout a copy of the
<a href="//git.skarnet.org/cgi-bin/cgit.cgi/s6/">s6
git repository</a>:
diff --git a/doc/upgrade.html b/doc/upgrade.html
index 45f5279..43dce08 100644
--- a/doc/upgrade.html
+++ b/doc/upgrade.html
@@ -18,6 +18,13 @@
<h1> What has changed in s6 </h1>
+<h2> in 2.11.3.1 </h2>
+
+<ul>
+ <li> <a href="//skarnet.org/software/execline/">execline</a>
+recommended dependency bumped to 2.9.2.1. </li>
+</ul>
+
<h2> in 2.11.3.0 </h2>
<ul>
diff --git a/package/info b/package/info
index 78d3ae4..e3d6e79 100644
--- a/package/info
+++ b/package/info
@@ -1,4 +1,4 @@
package=s6
-version=2.11.3.0
+version=2.11.3.1
category=admin
package_macro_name=S6
diff --git a/src/daemontools-extras/s6-softlimit.c b/src/daemontools-extras/s6-softlimit.c
index f9db3a6..b1bf615 100644
--- a/src/daemontools-extras/s6-softlimit.c
+++ b/src/daemontools-extras/s6-softlimit.c
@@ -10,17 +10,27 @@
#define USAGE "s6-softlimit [ -a allbytes ] [ -c corebytes ] [ -d databytes ] [ -f filebytes ] [ -l lockbytes ] [ -m membytes ] [ -o openfiles ] [ -p processes ] [ -r residentbytes ] [ -s stackbytes ] [ -t cpusecs ] prog..."
+static int what = 1 ;
+
static void doit (int res, char const *arg)
{
struct rlimit r ;
if (getrlimit(res, &r) < 0) strerr_diefu1sys(111, "getrlimit") ;
- if ((arg[0] == '=') && !arg[1]) r.rlim_cur = r.rlim_max ;
+ if ((arg[0] == '=') && !arg[1])
+ {
+ if (what & 2) r.rlim_max = RLIM_INFINITY ;
+ if (what & 1) r.rlim_cur = r.rlim_max ;
+ }
else
{
uint64_t n ;
if (!uint640_scan(arg, &n)) strerr_dieusage(100, USAGE) ;
- if (n > (uint64_t)r.rlim_max) n = (uint64_t)r.rlim_max ;
- r.rlim_cur = (rlim_t)n ;
+ if (what & 2) r.rlim_max = n ;
+ if (what & 1)
+ {
+ if (n > r.rlim_max) n = r.rlim_max ;
+ r.rlim_cur = n ;
+ }
}
if (setrlimit(res, &r) < 0) strerr_diefu1sys(111, "setrlimit") ;
}
@@ -31,10 +41,12 @@ int main (int argc, char const *const *argv)
PROG = "s6-softlimit" ;
for (;;)
{
- int opt = subgetopt_r(argc, argv, "a:c:d:f:l:m:o:p:r:s:t:", &l) ;
+ int opt = subgetopt_r(argc, argv, "hHa:c:d:f:l:m:o:p:r:s:t:", &l) ;
if (opt == -1) break ;
switch (opt)
{
+ case 'h' : what = 2 ; break ;
+ case 'H' : what = 3 ; break ;
case 'a' :
#ifdef RLIMIT_AS
doit(RLIMIT_AS, l.arg) ;