Roxen.git / server / start

version» Context lines:

Roxen.git/server/start:1259:    if [ -f "bin/setup_nsr.pike" ]; then    # Setup .nsr (Networker) files for the logfile directories.    eval "\"$pike\" $PIKEARGS $DEFINES bin/setup_nsr.pike --logdir=\"$LOGDIR\" --debugdir=\"$DEBUGDIR\""    fi    if [ $verbose -gt 0 ]; then    dp "Using configuration from $DIR"    dp "Storing the debug log in ${DEBUGLOG}.1"    dp "You can use the administration interface in the server to see debug info."    else :; fi    -  if ( +  if { +  # NB: In this block both fd 1 and fd 2 go to the start_*.output file. +  # Fd 3 is mapped to stderr for the main start script.    (    # Minor race here wrt pid file cleanup.       # Note: We can't use $$ here since it is the pid of the master shell.    # We can't use $(exec sh -c 'echo $PPID') (the POSIX way), for    # multiple reasons, most of them pertaining to /bin/sh on    # Solaris which supports neither $PPID nor $().    old_start_pid="$start_pid"    start_pid="`\"$pike\" $PIKEARGS -e 'return (string)getppid();'`"    lock_pid_file "$start_pid" "start" "$canonicalconf"
Roxen.git/server/start:1346:    done    ) &    # Minor race here wrt pid file contents.    start_pid=$!    trap "" 0    dp "Forked start script, pid $start_pid." 2>&3    dp "Start script pid $start_pid."       if test "x$daemonize" = "xyes"; then :; else    trap "stop_roxen $start_pid TERM start \"$canonicalconf\" \"start script\"" 2 15 +  dp "Waiting for start script to terminate..." 2>&3    wait;    signal_exit    fi -  ) 3>&2 </dev/null >"$DEBUGDIR/start_$FILES.output" 2>&1; then +  } 3>&2 </dev/null >"$DEBUGDIR/start_$FILES.output" 2>&1; then    trap "" 0    :    else    dp 'Failed to spawn subshell. -- Permission problem?'    cleanup_start_pid_file    exit 1    fi       # Try to get rid of some fd's.    # Some /bin/sh's have problems detaching otherwise.