Megatest

Diff
Login

Differences From Artifact [2caba19210]:

To Artifact [d7826fbb60]:


324
325
326
327
328
329
330
331
332
333
334



















335
336
337
338

339
340
341
342
343
344
345
324
325
326
327
328
329
330




331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352

353
354
355
356
357
358
359
360







-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+



-
+







	  ;;    (server:client-setup (- numtries 1))
	  ;;    #f)
	   (server:client-connect iface pullport pubport)) ;; )
	(if (> numtries 0)
	    (let ((exe (car (argv)))
		  (pid #f))
	      (debug:print-info 0 "No server available, attempting to start one...")
	      ;; (set! pid (process-run exe (list "-server" "-" "-debug" (if (list? *verbosity*)
	      ;;   							  (string-intersperse *verbosity* ",")
	      ;;   							  (conc *verbosity*)))))
	      (set! pid (process-fork (lambda ()
	      (set! pid (process-run exe (list "-server" "-" "-debug" (if (list? *verbosity*)
	         							  (string-intersperse *verbosity* ",")
	         							  (conc *verbosity*)))))
	      ;; (set! pid (process-fork (lambda ()
					;; (change-directory "/")
					;; (let ((fd-r (file-open "/dev/null" open/rdonly))
					;;       (fd-w (file-open "/dev/null" open/wronly)))
					;;   (duplicate-fileno fd-r 0)
					;;   (duplicate-fileno fd-w 1)
					;;   (file-close fd-r)
					;;   (file-close fd-w))
					;; (let ((child-pid (process-fork (lambda ()(server:launch)))))
					;;   (if (not (zero? child-pid))
					;;       (exit 0)))
					;; (create-session)
					;; (duplicate-fileno 1 2)
					;; (void)
					;; ;; child-pid
					;; )))
					;; (current-input-port  (open-input-file  "/dev/null"))
					;; (current-output-port (open-output-file "/dev/null"))
					;; (current-error-port  (open-output-file "/dev/null"))
					(server:launch)))) ;; should never get here ....
	      ;;                           (server:launch)))) ;; should never get here ....
	      (let loop ((count 0))
		(let ((hostinfo (open-run-close tasks:get-best-server tasks:open-db)))
		  (if (not hostinfo)
		      (begin
			(debug:print-info 0 "Waiting for server pid=" pid " to start")
			(sleep 2) ;; give server time to start
			(if (< count 5)