// Command test_serviced is an implementation of the test_service service.
package main

import (
	"fmt"
	"log"

	"veyron.io/veyron/veyron/lib/signals"
	_ "veyron.io/veyron/veyron/profiles"
	"veyron.io/veyron/veyron2/rt"
)

func main() {
	// Create the runtime
	r := rt.Init()
	defer r.Cleanup()

	s, endpoint, err := StartServer(r)
	if err != nil {
		log.Fatal("", err)
	}
	defer s.Stop()

	fmt.Printf("Listening at: %v\n", endpoint)
	<-signals.ShutdownOnSignals()
}

// Command test_serviced is an implementation of the test_service service.
package main

import (
	"fmt"
	"log"

	"veyron.io/veyron/veyron/lib/signals"
	_ "veyron.io/veyron/veyron/profiles"
	"veyron.io/veyron/veyron2/rt"
)

func main() {
	// Create the runtime
	r := rt.Init()
	defer r.Cleanup()

	s, endpoint, err := StartServer(r)
	if err != nil {
		log.Fatal("", err)
	}
	defer s.Stop()

	fmt.Printf("Listening at: %v\n", endpoint)
	<-signals.ShutdownOnSignals(r)
}

Add runtime arg to ShutdownOnSignals.
veyron.js: Add runtime arg to ShutdownOnSignals.

Change-Id: Ib773c40e7cb7f7c5df3b5cf5fea73a03dd709cb5
