patches and low-level development discussion
 help / color / mirror / code / Atom feed
blob b1aa586996ff9adcd10579c59bd8a8cb3776a318 1693 bytes (raw)
name: pkgs/skaware-packages/0001-s6-softlimit-add-p-option-for-rlimit-rtprio.patch 	 # note: path name is non-authoritative(*)

 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&nbsp;<em>prio</em></tt>&nbsp;: 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) ;

debug log:

solving b1aa586 ...
found b1aa586 in https://inbox.spectrum-os.org/spectrum-devel/20260626185509.3715326-4-colby@colbyt.com/ ||
	https://inbox.spectrum-os.org/spectrum-devel/fe5ebc4b6b171af5955cc4c2f256a1006cd79885.1782409229.git.colby@colbyt.com/

applying [1/1] https://inbox.spectrum-os.org/spectrum-devel/20260626185509.3715326-4-colby@colbyt.com/
diff --git a/pkgs/skaware-packages/0001-s6-softlimit-add-p-option-for-rlimit-rtprio.patch b/pkgs/skaware-packages/0001-s6-softlimit-add-p-option-for-rlimit-rtprio.patch
new file mode 100644
index 0000000..b1aa586

Checking patch pkgs/skaware-packages/0001-s6-softlimit-add-p-option-for-rlimit-rtprio.patch...
Applied patch pkgs/skaware-packages/0001-s6-softlimit-add-p-option-for-rlimit-rtprio.patch cleanly.

skipping https://inbox.spectrum-os.org/spectrum-devel/fe5ebc4b6b171af5955cc4c2f256a1006cd79885.1782409229.git.colby@colbyt.com/ for b1aa586
index at:
100644 b1aa586996ff9adcd10579c59bd8a8cb3776a318	pkgs/skaware-packages/0001-s6-softlimit-add-p-option-for-rlimit-rtprio.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/crosvm
	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/nixpkgs
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock
	https://spectrum-os.org/git/www

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).