1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
| | SPDX-FileCopyrightText: 2025 Alyssa Ross <hi@alyssa.is>
SPDX-License-Identifier: ISC
diff --git a/doc/s6-softlimit.html b/doc/s6-softlimit.html
index 05701ce..49a5b40 100644
--- a/doc/s6-softlimit.html
+++ b/doc/s6-softlimit.html
@@ -28 +28 @@ s6-softlimit changes its process limits, then executes into another program.
- s6-softlimit [ -H | -h ] [ -a <em>allmem</em> ] [ -c <em>core</em> ] [ -d <em>data</em> ] [ -f <em>fsize</em> ] [ -l <em>lock</em> ] [ -m <em>mem</em> ] [ -o <em>ofiles</em> ] [ -p <em>proc</em> ] [ -r <em>res</em> ] [ -s <em>stack</em> ] [ -t <em>cpusecs</em> ] <em>prog...</em>
+ s6-softlimit [ -H | -h ] [ -a <em>allmem</em> ] [ -c <em>core</em> ] [ -d <em>data</em> ] [ -f <em>fsize</em> ] [ -l <em>lock</em> ] [ -m <em>mem</em> ] [ -o <em>ofiles</em> ] [ -P <em>prio</em> ] [ -p <em>proc</em> ] [ -r <em>res</em> ] [ -s <em>stack</em> ] [ -t <em>cpusecs</em> ] <em>prog...</em>
@@ -60,0 +61 @@ and s6-softlimit will die. There is virtually no reason to ever use this. </li>
+ <li> <tt>-P <em>prio</em></tt> : limit the real-time priority to <em>prio</em>. </li>
diff --git a/src/daemontools-extras/s6-softlimit.c b/src/daemontools-extras/s6-softlimit.c
index d6112b2..beb7325 100644
--- a/src/daemontools-extras/s6-softlimit.c
+++ b/src/daemontools-extras/s6-softlimit.c
@@ -44 +44 @@ int main (int argc, char const *const *argv)
- int opt = subgetopt_r(argc, argv, "hHa: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:p:r:s:t:", &l) ;
@@ -105,0 +106,5 @@ int main (int argc, char const *const *argv)
+#endif
+ break ;
+ case 'P' :
+#ifdef RLIMIT_RTPRIO
+ doit(RLIMIT_RTPRIO, l.arg) ;
|