aboutsummaryrefslogtreecommitdiff
path: root/src/shared
AgeCommit message (Collapse)Author
2024-07-19openrc: dynamic paths for user servicesAnna (navi) Figueiredo Gomes
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 <navi@vlhl.dev>
2023-10-03Relocate pipes.c and pipes.h file to shared directory.Lexxy Fox
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.
2023-09-12misc: add syscall fallback for close_range for musl libcNatanael Copa
Add fallback for the close_range syscall wrapper. This is needed for musl libc, which currently does not have a close_range wrapper. Also set errno on errors.
2023-09-12misc: add cloexec_fds_from() helper functionNatanael Copa
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.
2023-08-29Don't re-define strlcpy/strlcat with >=glibc-2.38Sam James
`>=glibc-2.38` implements strlcpy, strlcat, etc so check for those functions with Meson and don't provide conflicting prototypes. Technically, it doesn't need _GNU_SOURCE, but it's easier because it's not clear right now what glibc wants to guard it with. Note that these are in POSIX next anyway. Fixes: https://github.com/OpenRC/openrc/issues/643 Signed-off-by: Sam James <sam@gentoo.org>
2023-04-24openrc-run: silence lock failures with --no-depsDominique Martinet
work around scary warnings described in previous commit
2023-04-20shared: fix pointer type in UNCONSTSam James
Thanks to vapier for noticing.
2023-04-19Rename attribute macros to namespaced RC_*Sam James
This conflicts with linux-headers which uses __unused for some padding members on ppc64le at least. Closes: https://github.com/OpenRC/openrc/issues/622
2023-01-29shared: missing includes from IWYUSam James
2023-01-28src: shared: schedules: add missing includes to headerSam James
Needed for clang-tidy prep work, as it requires headers to work standalone (which is useful anyway).
2023-01-28src: shared: plugin: add missing includes to headerSam James
Needed for clang-tidy prep work, as it requires headers to work standalone (which is useful anyway).
2023-01-28src: shared: misc: add missing includes to headerSam James
Needed for clang-tidy prep work, as it requires headers to work standalone (which is useful anyway).
2023-01-28src: shared: helpers: add missing includes to headerSam James
Needed for clang-tidy prep work, as it requires headers to work standalone (which is useful anyway).
2023-01-25shared: move _noreturn definition into helpers.hSam James
2022-05-08shared/misc.c: free env_allow if returning early from env_filterSam James
Signed-off-by: Sam James <sam@gentoo.org>
2022-04-30multiple spelling and typo fixesJosh Soref
This fixes #516.
2022-04-06migrate fully to meson build systemWilliam Hubbs
- drop old build system - move shared include and source files to common directory - drop "rc-" prefix from shared include and source files - move executable-specific code to individual directories under src - adjust top-level .gitignore file for new build system This closes #489.