Roxen.git / server / start

version» Context lines:

Roxen.git/server/start:1:   #!/bin/sh   # - # $Id: start,v 1.241 2011/01/24 16:36:41 mast Exp $ + # $Id: start,v 1.242 2011/03/21 00:17:43 mast Exp $      ### If --silent-start is given as the first argument,   ### nothing will be printed to stdout by the script.      if [ "x$1" = "x--silent-start" ] ; then    SILENT_START="y"    shift   fi      check_owner() {
Roxen.git/server/start:151:   # Darwin uses threads.   if uname | grep 'Darwin' >/dev/null 2>&1; then    DEFINES="$DEFINES -DENABLE_THREADS"   fi   # Also enabled on Linux.   if uname | grep 'Linux' >/dev/null 2>&1; then    DEFINES="$DEFINES -DENABLE_THREADS"   fi      gdb=no + valgrind=   truss=      remove_dumped_passed=no   remove_old_dot_o_files () {    dp "Removing old precompiled files ($1)"    # This really cannot be done from here anymore -- pass on an option    # to roxenloader instead.       # Make sure that the argument isn't duplicated for every restart...    if [ "x$remove_dumped_passed" = "xyes" ]; then :; else
Roxen.git/server/start:317:    debug=0    ;;    '--keep-mysql')    keep_mysql=1    ;;    '--gdb')    gdb=gdb    once=2    debug=0    ;; +  --valgrind|--valgrind=*) +  valgrind="$1" +  once=2 +  debug=0 +  ;;    '--program')    program="$2"    once=2    passhelp=1    keep_mysql=1    shift    shift    # Pass any remaining arguments along to the program.    while [ ! c"$1" = "c" ] ; do    pass="$pass '`echo \"$1\" | sed -e \"s/'/'\\\"'\\\"'/g\"`'"
Roxen.git/server/start:470:       .B--stopB.: Stop the server.       .B--keep-mysqlB.: Do not shut down MySQL process when exiting    the start script. Useful during development    or any other scenario where the start script    is frequently terminated.       .B--gdbB.: Run the server in gdb. Implies .B--onceB..    +  .B--valgrind[=valgrind args]B.: Run the server in valgrind. Implies .B--onceB.. +     .B--programB.: Start a different program with the Roxen    Pike. As an example,    .B./start --program bin/install.pikeB. will    start the installation program normally    started with .B./installB.       .B--with-debugB.: Enable debug       .B--without-debugB.: Disable all debug. This is the default.   
Roxen.git/server/start:816:    remove_old_dot_o_files "user request"    fi    if [ "x$DIR" != "x../configurations" ] ; then    args="$PIKEARGS $DEFINES $ARGS $program --config-dir='`echo \"$DIR\" | sed -e \"s/'/'\\\"'\\\"'/g\"`' $pass"    else    args="$PIKEARGS $DEFINES $ARGS $program $pass"    fi    if [ x"$cd_to" != x ] ; then    cd "$cd_to"    fi -  if [ "x$gdb" = "xno" ]; then +  if [ "x$gdb" = "xno" -a "x$valgrind" = "x" ]; then    if [ "x$once" = "x" ]; then    if [ $verbose -gt 0 ]; then    dp "Executing $pike $args"|sed -e "s!`pwd`!.!g"    fi    eval "fork_roxen \"$pike\" $args 2>>\"${DEBUGLOG}.1\" 1>&2"    dp "Roxen WebServer server pid $ROXEN_PID."    wait $ROXEN_PID 2>/dev/null 1>&2    exitcode="$?"    ROXEN_PID=""    else
Roxen.git/server/start:843:    else    eval "$truss \"$pike\" $args" 2>&1    exitcode="$?"    fi    else    trap exit_fail 1    eval "(eval \"$truss \\\"$pike\\\" $args\" || kill -1 $$) 2>&1 $do_pipe"    exit $exitcode    fi    fi -  else +  elif [ "x$gdb" != "xno" ]; then    echo >.gdbinit handle SIGPIPE nostop noprint pass    echo >>.gdbinit handle SIGUSR1 nostop noprint pass    echo >>.gdbinit handle SIGUSR2 nostop noprint pass    echo >>.gdbinit handle SIGLWP nostop noprint pass    if uname | grep 'Linux' >/dev/null 2>&1; then    echo >>.gdbinit handle SIG38 nostop noprint pass    echo >>.gdbinit handle SIG39 nostop noprint pass    fi    echo >>.gdbinit break debug_fatal    echo >>.gdbinit break pike_gdb_breakpoint
Roxen.git/server/start:868:    # bin/pike script that is built by the top level Makefile in the    # Pike source tree).    dp "Executing $pike --gdb $args"    eval "\"$pike\" --gdb $args"    else    dp "Executing gdb $pike $args"    echo >>.gdbinit "run $args"    gdb "$pike"    fi    rm .gdbinit +  else +  firstline=`head -1 "$pike" 2>/dev/null` +  if expr "x$firstline" : 'x#! */.*' >/dev/null; then +  dp "Executing $pike $valgrind $args" +  eval "\"$pike\" \"$valgrind\" $args" +  else +  dp "Executing valgrind $pike $args" +  valgrind `expr "$valgrind" : '--valgrind=\(.*\)'` "$pike"    fi -  +  fi   }         #   # Now do the stuff   #      trap signal_exit 2 15   trap "" 1