From 40ca07ee7ca238fa63329603e557e7fdfcc38f3a Mon Sep 17 00:00:00 2001 From: Kevin Tew Date: Tue, 9 Oct 2012 14:29:44 -0600 Subject: [PATCH] [Distributed Places] use racket -lm to launch new racket nodes instead of -tm --- collects/racket/place/distributed.rkt | 18 ++++++++++-------- .../scribblings/reference/distributed.scrbl | 2 +- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/collects/racket/place/distributed.rkt b/collects/racket/place/distributed.rkt index 537a1ed847..74abab4205 100644 --- a/collects/racket/place/distributed.rkt +++ b/collects/racket/place/distributed.rkt @@ -26,7 +26,6 @@ (provide ssh-bin-path racket-path - distributed-launch-path DEFAULT-ROUTER-PORT @@ -1403,7 +1402,7 @@ #:initial-message [initial-message #f] #:racket-path [racketpath (racket-path)] #:ssh-bin-path [sshpath (ssh-bin-path)] - #:distributed-launch-path [distributedlaunchpath (->writeable-module-path distributed-launch-path)] + #:distributed-launch-path [distributedlaunchpath #f] #:restart-on-exit [restart-on-exit #f] #:named [named #f] #:thunk [thunk #f]) @@ -1422,7 +1421,7 @@ #:initial-message [initial-message #f] #:racket-path [racketpath (racket-path)] #:ssh-bin-path [sshpath (ssh-bin-path)] - #:distributed-launch-path [distributedlaunchpath (->writeable-module-path distributed-launch-path)] + #:distributed-launch-path [distributedlaunchpath #f] #:restart-on-exit [restart-on-exit #f] #:named [named #f] #:thunk [thunk #f]) @@ -1439,7 +1438,7 @@ #:initial-message [initial-message #f] #:racket-path [racketpath (racket-path)] #:ssh-bin-path [sshpath (ssh-bin-path)] - #:distributed-launch-path [distributedlaunchpath (->writeable-module-path distributed-launch-path)] + #:distributed-launch-path [distributedlaunchpath #f] #:restart-on-exit [restart-on-exit #f]) (define node (spawn-remote-racket-node host #:listen-port listen-port @@ -1467,18 +1466,20 @@ (define (spawn-remote-racket-node host #:listen-port [listen-port DEFAULT-ROUTER-PORT] #:racket-path [racketpath (racket-path)] #:ssh-bin-path [sshpath (ssh-bin-path)] - #:distributed-launch-path [distributedlaunchpath (->writeable-module-path distributed-launch-path)] + #:distributed-launch-path [distributedlaunchpath #f] #:use-current-ports [use-current-ports #f]) (new remote-node% [host-name host] [listen-port listen-port] - [cmdline-list (list sshpath host racketpath "-tm" distributedlaunchpath "spawn" (->string listen-port))] + [cmdline-list (if distributedlaunchpath + (list sshpath host racketpath "-tm" distributedlaunchpath "spawn" (->string listen-port)) + (list sshpath host racketpath "-lm racket/place/distributed/launch spawn" (->string listen-port)))] [use-current-ports use-current-ports])) (define (create-place-node host #:listen-port [listen-port DEFAULT-ROUTER-PORT] #:racket-path [racketpath (racket-path)] #:ssh-bin-path [sshpath (ssh-bin-path)] - #:distributed-launch-path [distributedlaunchpath (->writeable-module-path distributed-launch-path)] + #:distributed-launch-path [distributedlaunchpath #f] #:use-current-ports [use-current-ports #t]) (spawn-remote-racket-node host #:listen-port listen-port @@ -1508,6 +1509,7 @@ (define-syntax-rule (after-seconds _seconds _body ...) (new after-seconds% [seconds _seconds] [thunk (lambda () _body ...)])) +;; -> node name -> (define (connect-to-named-place node name) (send node remote-connect name)) @@ -1668,7 +1670,7 @@ (define (spawn-node-at host #:listen-port [listen-port DEFAULT-ROUTER-PORT] #:racket-path [racketpath (racket-path)] #:ssh-bin-path [sshpath (ssh-bin-path)] - #:distributed-launch-path [distributedlaunchpath (->writeable-module-path distributed-launch-path)]) + #:distributed-launch-path [distributedlaunchpath #f]) (define ch (make-channel)) (thread diff --git a/collects/scribblings/reference/distributed.scrbl b/collects/scribblings/reference/distributed.scrbl index c5d0cc38f3..57be85dd24 100644 --- a/collects/scribblings/reference/distributed.scrbl +++ b/collects/scribblings/reference/distributed.scrbl @@ -188,7 +188,7 @@ Spawns a new remote node at @racket[hostname] and returns a @racket[remote-node% [#:racket-path racket-path string-path? (racket-path)] [#:ssh-bin-path ssh-path string-path? (ssh-bin-path)] [#:distributed-launch-path launcher-path string-path? (path->string distributed-launch-path)] - [#:use-current-ports use-current-ports #t]) (is-a?/c remote-node%)]{ + [#:use-current-ports use-current-ports boolean? #t]) (is-a?/c remote-node%)]{ Like @racket[spawn-remote-racket-node], but the @racket[current-output-port] and @racket[current-error-port] are used as the standard ports for the spawned process instead of new pipe ports.}