mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 14:15:06 +03:00
syscall check
This commit is contained in:
parent
5668f28f46
commit
1e0794761b
1 changed files with 3 additions and 3 deletions
|
@ -5,13 +5,13 @@ package main
|
|||
|
||||
import (
|
||||
"os/exec"
|
||||
"syscall"
|
||||
//"syscall"
|
||||
)
|
||||
|
||||
func run_command(command string) []byte {
|
||||
args := []string{"-json", command}
|
||||
cmd := exec.Command(riv_ctrl_path, args...)
|
||||
cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true}
|
||||
//cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true}
|
||||
out, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
//log.Fatalf("cmd.Run() failed with %s\n", err)
|
||||
|
@ -23,7 +23,7 @@ func run_command(command string) []byte {
|
|||
func run_command_with_arg(command string, arg string) []byte {
|
||||
args := []string{"-json", command, arg}
|
||||
cmd := exec.Command(riv_ctrl_path, args...)
|
||||
cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true}
|
||||
//cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true}
|
||||
out, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
//log.Fatalf("command failed: %s\n", riv_ctrl_path+" "+strings.Join(args, " "))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue