Set GOMAXPROCS. Print errors on stderr.

This commit is contained in:
Daniel Smith
2015-02-19 10:30:31 -08:00
parent 1b5d14423c
commit fcddefa184
7 changed files with 45 additions and 4 deletions

View File

@@ -21,6 +21,10 @@ limitations under the License.
package main
import (
"fmt"
"os"
"runtime"
"github.com/GoogleCloudPlatform/kubernetes/pkg/controllermanager"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/GoogleCloudPlatform/kubernetes/pkg/version/verflag"
@@ -29,6 +33,7 @@ import (
)
func main() {
runtime.GOMAXPROCS(runtime.NumCPU())
s := controllermanager.NewCMServer()
s.AddFlags(pflag.CommandLine)
@@ -38,5 +43,8 @@ func main() {
verflag.PrintAndExitIfRequested()
s.Run(pflag.CommandLine.Args())
if err := s.Run(pflag.CommandLine.Args()); err != nil {
fmt.Fprint(os.Stderr, err.Error)
os.Exit(1)
}
}