xbuild: Disable a few non-working arches
xbuild: Utility script to cross-compile static binaries
dlog: Avoid trying to close an invalid file descriptor
Avoid a call to close() for the output file descriptor if the file has
not yet been opened. This can happen if no input at all is provided or
--skip-empty/-e is enabled and only empty lines are read.
The issue was reproducible as follows:
% ./dlog -e < /dev/null
WARN Closing log: Bad file descriptor [dlog.c:163, main]
%
d[r]log: Reduce size of iovec struct arrays
Now that the trailing newline character is present in the line buffers
and not added anymore as the last iovec entry, it is possible to reduce
the size of the arrays by one.
d[sr]log: Add --skip-empty/-e command line option
Add a new --skip-empty/-e command line option which can be used to
discard empty input lines. By default empty input lines are copied
over to the output log.
Prevent logging from exiting on empty lines
Before this commit, `freadline` did not distinguish between an empty
line and EOF. This would case a printf such as
```
printf("\nHello, World\n");
```
to cause dlog, dslog, or drlog to exit.
In order to fix this, this commit includes the delimiter in the result
of `freaduntil`, which means `\n` will be included in all calls to
`freadline`.
Fixes #10
Fixes #12
Remove GCC 4.x -std=c99 workaround
Place #include <sys/sysinfo.h> in UCLIBC #ifdef
Compile under gcc 4.7 and with uclibc
Validated compilation under -std=gnu99 and -std=gnu11 using gcc 4.7.2
and gcc 9.3.0.
Add libsetunbuf LD_PRELOAD-able helper
man: Add COUNT metavariable for -m/--max-respawns
Also, regenerate the prebuilt dmon.8 file.
dmon: Propagate exit status of monitored process
This is particularly useful when using the -m/--max-respawns option to
know whether the monitored process finished correctly or otherwise know
that it failed after the maximum amount of retries.
Add max-respawns parameter to dmon
Add .gitattributes to control archived files
Makefile: Add convenience "dist" target
Make git ignore libdmon.a
multicall: Support listing available applets
Add support for listing the available applets in a multicall dmon
binary, if the DMON_LIST_MULTICALL_APPLETS environment variable is
set. In that case only the list is printed, one item per line, and
the program will exit immediately.
README: Bring back text about MULTICALL=0|1