Index: megatest.scm ================================================================== --- megatest.scm +++ megatest.scm @@ -343,11 +343,11 @@ #f)) (chosen-transport (string->symbol (or transport-from-cmdln transport-from-cmdinfo transport-from-config "fs")))) - (debug:print 0 "chosen-transport: " chosen-transport " have; config=" transport-from-config ", cmdln=" transport-from-cmdln ", cmdinfo=" transport-from-cmdinfo) + (debug:print 2 "chosen-transport: " chosen-transport " have; config=" transport-from-config ", cmdln=" transport-from-cmdln ", cmdinfo=" transport-from-cmdinfo) (case chosen-transport ((http) (set! *transport-type 'http) (server:ensure-running) (client:launch)) Index: server.scm ================================================================== --- server.scm +++ server.scm @@ -124,28 +124,24 @@ (trycount 0)) (if (or (not servers) (null? servers)) (begin (if (even? trycount) ;; just do the server start every other time through this loop (every 8 seconds) - (begin - (debug:print 0 "INFO: Starting server as none running ...") + (let ((cmdln (conc (if (getenv "MT_MEGATEST") (getenv "MT_MEGATEST") "megatest") + " -server - -daemonize"))) + (debug:print 0 "INFO: Starting server (" cmdln ") as none running ...") ;; (server:launch (string->symbol (args:get-arg "-transport" "http")))) ;; no need to use fork, no need to do the list-servers trick. Just start the damn server, it will exit on it's own ;; if there is an existing server - (system (conc (if (getenv "MT_MEGATEST") (getenv "MT_MEGATEST") "megatest") - " -server - -daemonize")) + (system cmdln) (thread-sleep! 3) ;; (process-run (car (argv)) (list "-server" "-" "-daemonize" "-transport" (args:get-arg "-transport" "http"))) - ;; (system (conc "megatest -list-servers | egrep '" megatest-version ".*alive' || megatest -server - -daemonize && sleep 3")) - ;; (process-fork (lambda () - ;; (daemon:ize) - ;; (server:launch (string->symbol (args:get-arg "-transport" "http"))))) ) (begin (debug:print-info 0 "Waiting for server to start") (thread-sleep! 4))) (if (< trycount 10) (loop (open-run-close tasks:get-best-server tasks:open-db) (+ trycount 1)) (debug:print 0 "WARNING: Couldn't start or find a server."))) - (debug:print 0 "INFO: Server(s) running " servers) + (debug:print 2 "INFO: Server(s) running " servers) )))