xbuild: Update with targets supported by Zig 0.13.0
Fix the build on OpenBSD, and possibly other BSDs
make: Fix building libnofork and libsetunbuf
denv: Use exit code 111 for most errors
Use exit code 111 to make it possible to tell apart errors from
denv/envdir baefore executing the child program, from errors
during execution of the child itself. This follows the convention
from daemontools/envdir.
denv: Make stat/open errors fatal in env_envdir
Consider error from stat/open fatal when reading a directory with
environment entries (env_envdir); under the assumption that the
directory and its contents should be readable. It seems better to
bail loudly rather than silently skip actions explicitly requested
with command line switches.
denv: Improve error reporting and its consistency
Change a few die() and clog_warning() call sites to use the same format
for error reporting, using fuller paths where possible, and replacing
strerror(errno) usage with ERRSTR.
util: Remove leftover $E format specifier in message
Change a leftover $E specifier in a format string into a %s
plus ERRSTR combination. The $E specifier was used before the
removal of the libwheel dependency, and should not have been
used after acd8448.
util: Move reallocarray() detection into header
Move the definition of USE_LIBC_REALLOCARRAY, and the associated
redirection macro into util.h, which makes it possible to use the
fallback implementation (if needed) in translation units other
than util.c; e.g. the recently added denv.c needs this.
Retry system calls that may be interrupted with EINTR
denv: Support being invoked as envdir
Add the needed code to support being invoked as envdir, both for the
standalone and multicall binaries.
CI: Remove Sourcehut builds configuration
Makefile: Add denv to targets where it is missing
denv: Rename --direnv CLI option to --envdir
Change the --direnv option to --envdir, which has the same name as the
daemontools utility. This should make it easier for users to remember
it or recognize what it does without having to read the manual.
Moreover, the option was already listed as --envdir in the manual.
dlog: Fix typo in manual page
denv: Support loading environment.d(5) files
Add a new -f/--file which loads variables in the environment.d(5)
format. Variable expansions are not supported at the moment.
denv: Consider only-whitespace files as empty
Handle the case where a file read from an envdir contains only
whitespace in the line read as input, treating it as it were an
empty (zero byte) file by removing the corresponding environment
variable.
denv: Add missing newline at end of exit message
denv: Treat form-feed characters as trimmable whitespace