X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Feximon.src;h=fac24208cabc59218d3a9322df6dd9b59e6a082c;hb=3d1451ea26e96e63a22d96a08dcfe2e80701c75c;hp=14cc7f9c8a8e1f0ca82cb30153aac1b4e1bad6f9;hpb=059ec3d9952740285fb1ebf47961b8aca2eb1b4a;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/eximon.src b/src/src/eximon.src index 14cc7f9c8..fac24208c 100644 --- a/src/src/eximon.src +++ b/src/src/eximon.src @@ -1,12 +1,10 @@ -# $Cambridge: exim/src/src/eximon.src,v 1.1 2004/10/07 10:39:01 ph10 Exp $ - # Base source of start-up shell script for the Exim Monitor. Used to set the # required environment variables before running the program. Using script # rather than a configuration file means that computation can be done. # The build process concatenates on the front of this various settings from # os-specific files and from the user's configuration file. -# Copyright (c) 2004 University of Cambridge. +# Copyright (c) 2004 - 2012 University of Cambridge. # See the file NOTICE for conditions of use and distribution. # Except when they appear in comments, the following placeholders in this @@ -21,6 +19,14 @@ # 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="$@" @@ -183,8 +189,13 @@ export EXIM_PATH LD_LIBRARY_PATH \ # 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