<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openrc.git/src/supervise-daemon, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://git.vlhl.dev/navi/openrc/openrc.git/atom?h=master</id>
<link rel='self' href='https://git.vlhl.dev/navi/openrc/openrc.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.vlhl.dev/navi/openrc/openrc.git/'/>
<updated>2024-07-19T18:40:28+00:00</updated>
<entry>
<title>openrc: dynamic paths for user services</title>
<updated>2024-07-19T18:40:28+00:00</updated>
<author>
<name>Anna (navi) Figueiredo Gomes</name>
<email>navi@vlhl.dev</email>
</author>
<published>2024-03-20T22:45:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vlhl.dev/navi/openrc/openrc.git/commit/?id=c34fcd63f05044f9034b26c52f19c91e04668da7'/>
<id>urn:sha1:c34fcd63f05044f9034b26c52f19c91e04668da7</id>
<content type='text'>
add two api functions, `rc_service_dir` and `rc_sysconf_dir`, both are
generate paths (and sub-paths) for resources, and meant to replace the
hardcoded variables like `RC_SVCDIR`.

those functions differ by dynamically switching between the system path,
or the user path, set in their home folder or runtime directory.

this lays out the intial support for user services.

Signed-off-by: Anna (navi) Figueiredo Gomes &lt;navi@vlhl.dev&gt;
</content>
</entry>
<entry>
<title>Relocate pipes.c and pipes.h file to shared directory.</title>
<updated>2023-10-03T21:43:39+00:00</updated>
<author>
<name>Lexxy Fox</name>
<email>lexxyfox@gmail.com</email>
</author>
<published>2023-09-26T18:30:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vlhl.dev/navi/openrc/openrc.git/commit/?id=cf9286d2d84f7aef237ec0d363c692ef5035aa85'/>
<id>urn:sha1:cf9286d2d84f7aef237ec0d363c692ef5035aa85</id>
<content type='text'>
With the addition of logger process redirect in supervise-daemon,
pipes.c and pipes.h are now included in both s-s-d and supervise-daemon.
Thus it makes sense to move the source files to the src/shared dir.
</content>
</entry>
<entry>
<title>supervise-daemon: implement output_logger and error_logger.</title>
<updated>2023-10-03T21:43:39+00:00</updated>
<author>
<name>Lexxy Fox</name>
<email>lexxyfox@gmail.com</email>
</author>
<published>2023-09-25T22:33:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vlhl.dev/navi/openrc/openrc.git/commit/?id=9934e9f96ea91995dfab382bf05b47d43c1ac4f9'/>
<id>urn:sha1:9934e9f96ea91995dfab382bf05b47d43c1ac4f9</id>
<content type='text'>
Allows redirecting process stdin and stdout to another process,
just like is already possible with start-stop-daemon.

Also added --stdout-logger and --stderr-logger to the man page.
</content>
</entry>
<entry>
<title>misc: add cloexec_fds_from() helper function</title>
<updated>2023-09-13T03:53:12+00:00</updated>
<author>
<name>Natanael Copa</name>
<email>ncopa@alpinelinux.org</email>
</author>
<published>2023-08-30T11:17:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vlhl.dev/navi/openrc/openrc.git/commit/?id=c199c5cf6e39d6e21b92bddba7beeebcc3afca79'/>
<id>urn:sha1:c199c5cf6e39d6e21b92bddba7beeebcc3afca79</id>
<content type='text'>
Move logic to set file descriptors to a cloexec_fds_from() function in
misc.c so it can be shared by both supervisor-daemon and
start-stop-daemon, and hide the details behind.
</content>
</entry>
<entry>
<title>supervise-daemon: rename HAVE_CLOSE_RANGE_EXEC to HAVE_CLOSE_RANGE</title>
<updated>2023-09-13T03:53:12+00:00</updated>
<author>
<name>Natanael Copa</name>
<email>ncopa@alpinelinux.org</email>
</author>
<published>2023-08-30T09:33:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vlhl.dev/navi/openrc/openrc.git/commit/?id=5bfb592d75f2e2ccfc94cb510c5eca755767dfbb'/>
<id>urn:sha1:5bfb592d75f2e2ccfc94cb510c5eca755767dfbb</id>
<content type='text'>
Use HAVE_CLOSE_RANGE to tell if system provides a close_range(2)
wrapper, which better explains the purpose.

Add a compat inline which returns -1 if close_range is unavailable.
</content>
</entry>
<entry>
<title>Rename attribute macros to namespaced RC_*</title>
<updated>2023-04-19T20:44:51+00:00</updated>
<author>
<name>Sam James</name>
<email>sam@gentoo.org</email>
</author>
<published>2023-04-19T03:29:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vlhl.dev/navi/openrc/openrc.git/commit/?id=eb8831a1416ab2ee8123b3add78421c2aa316b39'/>
<id>urn:sha1:eb8831a1416ab2ee8123b3add78421c2aa316b39</id>
<content type='text'>
This conflicts with linux-headers which uses __unused for some padding members
on ppc64le at least.

Closes: https://github.com/OpenRC/openrc/issues/622
</content>
</entry>
<entry>
<title>supervise-daemon: missing includes from IWYU</title>
<updated>2023-01-29T17:32:22+00:00</updated>
<author>
<name>Sam James</name>
<email>sam@gentoo.org</email>
</author>
<published>2023-01-29T04:19:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vlhl.dev/navi/openrc/openrc.git/commit/?id=00f90f2b0ebe25f8399a5f7f950f4bc01de8aeb1'/>
<id>urn:sha1:00f90f2b0ebe25f8399a5f7f950f4bc01de8aeb1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>supervise-daemon: mark various functions as noreturn</title>
<updated>2023-01-25T05:50:43+00:00</updated>
<author>
<name>Sam James</name>
<email>sam@gentoo.org</email>
</author>
<published>2023-01-25T04:08:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vlhl.dev/navi/openrc/openrc.git/commit/?id=ccc2b7114502b8cdf8add4fc2628f17f0e6df950'/>
<id>urn:sha1:ccc2b7114502b8cdf8add4fc2628f17f0e6df950</id>
<content type='text'>
For -Wmissing-noreturn.
</content>
</entry>
<entry>
<title>start-stop-daemon, supervise-daemon: use closefrom()/close_range()</title>
<updated>2023-01-21T03:44:37+00:00</updated>
<author>
<name>Matt Whitlock</name>
<email>gentoo@mattwhitlock.name</email>
</author>
<published>2022-08-21T13:10:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vlhl.dev/navi/openrc/openrc.git/commit/?id=9dfd2b2737351083e5bed173bda1acd01a70c510'/>
<id>urn:sha1:9dfd2b2737351083e5bed173bda1acd01a70c510</id>
<content type='text'>
On systems with a very large RLIMIT_NOFILE, calling close() in a loop
from 3 to getdtablesize() effects an enormous number of system calls.
There are better alternatives. Both BSD and Linux have the closefrom()
system call that closes all file descriptors with indices not less than
a specified minimum. Have start-stop-daemon call closefrom() on systems
where it's implemented, falling back to the old loop elsewhere.

Likewise, calling fcntl(i, F_SETFD, FD_CLOEXEC) in a loop from 3 to
getdtablesize() raises a similar performance concern. Linux 5.11 and
onward has a close_range() system call with a CLOSE_RANGE_CLOEXEC flag
that sets the FD_CLOEXEC flag on all file descriptors in a specified
range. Have supervise-daemon utilize this feature on systems where it's
implemented, falling back to the old loop elsewhere.
</content>
</entry>
<entry>
<title>start-stop-daemon, supervise-daemon: set autogroup nicelevel</title>
<updated>2022-09-06T22:26:22+00:00</updated>
<author>
<name>Matt Whitlock</name>
<email>gentoo@mattwhitlock.name</email>
</author>
<published>2022-08-21T13:55:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vlhl.dev/navi/openrc/openrc.git/commit/?id=112b69860f2cb6059c49404abbfb4e3f22603cfc'/>
<id>urn:sha1:112b69860f2cb6059c49404abbfb4e3f22603cfc</id>
<content type='text'>
As described in "Why nice levels are a placebo and have been for a very
long time, and no one seems to have noticed"[1], the Linux kernel in its
default configuration on many Linux distributions autogroups tasks by
session ID and "fairly" allocates CPU time among such autogroups. The
nice levels of tasks within each autogroup are only relative to
other tasks within the same autogroup. Effectively, this means that the
traditional nice level is rendered moot for tools like start-stop-daemon
and supervise-daemon, which start each daemon in its own session and
thus in its own autogroup. Linux does provide a means to change the
niceness of autogroups relative to each other, so let's have start-stop-
daemon and supervise-daemon make use of this feature where available so
that -N,--nicelevel/SSD_NICELEVEL will actually do what the user
intends. On systems where autogroups are not supported or are disabled,
this commit introduces no change in behavior.

Note that the setsid() call in the child process of start-stop-daemon is
moved to much earlier. This is necessary so that the new process will be
assigned to a new autogroup before the autogroup nicelevel is set. To
avoid inadvertently acquiring /dev/tty as the controlling terminal of
the new session after setsid() has given up the controlling terminal
inherited from the parent process, tty_fd is opened before the call to
setsid().

[1] https://www.reddit.com/r/linux/comments/d7hx2c/why_nice_levels_are_a_placebo_and_have_been_for_a/
This fixes #542.
</content>
</entry>
</feed>
