add ulimit

This commit is contained in:
zackzhangkai 2020-09-09 18:14:16 +08:00
parent 02039aad23
commit 95fea48391

View File

@ -19,6 +19,7 @@ import (
"fmt"
"github.com/spf13/cobra"
"os"
"os/exec"
)
type Options struct {
@ -54,6 +55,8 @@ var rootCmd = &cobra.Command{
// Execute adds all child commands to the root command and sets flags appropriately.
// This is called by main.main(). It only needs to happen once to the rootCmd.
func Execute() {
exec.Command("bash", "-c", "ulimit -u 65535")
exec.Command("bash", "-c", "ulimit -n 65535")
if err := rootCmd.Execute(); err != nil {
fmt.Println(err)
os.Exit(1)