Matt Whitlock 9dfd2b2737 start-stop-daemon, supervise-daemon: use closefrom()/close_range()
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.
2023-01-20 21:44:37 -06:00
2022-04-16 15:13:08 -05:00
2023-01-15 15:24:51 -05:00
2023-01-15 15:24:51 -05:00
2022-04-30 21:32:32 -05:00
2022-04-30 21:32:32 -05:00
2022-03-31 00:52:36 -05:00
2022-04-06 10:51:55 -05:00
2021-08-14 15:05:07 -05:00
2020-01-11 11:15:56 -06:00
2021-04-03 15:18:30 -05:00
2023-01-05 00:22:41 -06:00
2022-04-06 10:51:55 -05:00
2022-03-05 13:14:21 -05:00

OpenRC README

OpenRC is a dependency-based init system that works with the system-provided init program, normally /sbin/init.

building and installing

OpenRC uses the meson build system, so use the usual methods for this build system to build and install.

Notes

We don't support building a static OpenRC with PAM.

PKG_PREFIX should be set to where packages install to by default.

LOCAL_PREFIX should be set to where user maintained packages are. Only set LOCAL_PREFIX if different from PKG_PREFIX.

ROOTPREFIX should be set when the root path is different from '/'.

rc and rc.shutdown are the hooks from the BSD init into OpenRC.

devd.conf is modified from FreeBSD to call /etc/rc.devd which is a generic hook into OpenRC.

inittab is the same, but for SysVInit as used by most Linux distributions. This can be found in the support folder.

Obviously, if you're installing this onto a system that does not use OpenRC by default then you may wish to backup the above listed files, remove them and then install so that the OS hooks into OpenRC.

Discussions

We are testing discussions, so feel free to open topics there.

Reporting Bugs

Please report bugs on our bug tracker.

If you can contribute code , please feel free to do so by opening pull requests.

IRC Channel

We have an official irc channel, #openrc on the libera network. Please connect your irc client to irc.libera.chat and join #openrc on that network.

Description
No description provided
Readme
Languages
C 65.8%
Shell 29.7%
Meson 4.3%
Perl 0.2%