Also added gdb support.
This leaves us with a printf warning. We accept that as the cost of using PRINTF_FORMAT for strings that aren't libc formats.
In order to see the contents of messages on the queue, and to operate on them,
&'eximon'& must either be run as root or by an admin user.
+The command-line parameters of &'eximon'& are passed to &_eximon.bin_& and may
+contain X11 resource parameters interpreted by the X11 library. In addition,
+if the first parameter starts with the string "gdb" then it is removed and the
+binary is invoked under gdb (the parameter is used as the gdb command-name, so
+versioned variants of gdb can be invoked).
+
The monitor's window is divided into three parts. The first contains one or
more stripcharts and two action buttons, the second contains a &"tail"& of the
main log file, and the third is a display of the queue of messages awaiting
Not seeing resolver debug output on NetBSD, but suspect this is a
resolver implementation change.
+PP/20 Revert part of NM/04, it broke log_path containing %D expansions.
+ Left warnings. Added "eximon gdb" invocation mode.
+
Exim version 4.77
-----------------
# The name of the eximon binary, usually the same as the eximon script,
# with .bin stuck on the end.
-EXIMON_BINARY=${EXIMON_BINARY-$0.bin}
+EXIMON_BINARY="${EXIMON_BINARY-$0.bin}"
# The remaining parameters are values likely to be changed to suit the
# user's taste. They are documented in the EDITME file.
if (log_file[0] != 0)
{
- (void)string_format(log_file_open, sizeof(log_file_open), "%s", CS log_file);
+ /* Do *not* use "%s" here, we need the %D datestamp in the log_file to
+ be expanded! */
+ (void)string_format(log_file_open, sizeof(log_file_open), CS log_file);
log_datestamping = string_datestamp_offset >= 0;
LOG = fopen(CS log_file_open, "r");
# PROCESSED_FLAG
+# See if caller wants to invoke gdb
+
+use_gdb=''
+
+case ${1:-foo} in
+ gdb*) use_gdb="$1"; shift ;;
+esac
+
# Save arguments (can be the usual X parameters)
cmd_args="$@"
# Exec to the program we really want to run, thereby continuing in
# just the one process, and let it run in parallel with whatever
-# called this script.
+# called this script (unless gdb was requested in original $1).
-exec ${EXIMON_BINARY} $cmd_args &
+if [ "${use_gdb:-}" = "" ] ; then
+ exec "${EXIMON_BINARY}" $cmd_args &
+else
+ exec "$use_gdb" "${EXIMON_BINARY}" $cmd_args
+ # not backgrounded
+fi
# End