From 9380493c399985cd95162d675ee77384a38742b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Tue, 7 May 2024 19:36:12 +0800 Subject: [PATCH] Fix bad usage for exec --- tun_linux.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tun_linux.go b/tun_linux.go index bf95fbc..ce9c558 100644 --- a/tun_linux.go +++ b/tun_linux.go @@ -820,9 +820,9 @@ func (t *NativeTun) setSearchDomainForSystemdResolved() { if len(t.options.Inet6Address) > 0 { dnsServer = append(dnsServer, t.options.Inet6Address[0].Addr().Next()) } - shell.Exec(ctlPath, "domain", t.options.Name, "~.").Start() + go shell.Exec(ctlPath, "domain", t.options.Name, "~.").Run() if t.options.AutoRoute { - shell.Exec(ctlPath, "default-route", t.options.Name, "true").Start() - shell.Exec(ctlPath, append([]string{"dns", t.options.Name}, common.Map(dnsServer, netip.Addr.String)...)...).Start() + go shell.Exec(ctlPath, "default-route", t.options.Name, "true").Run() + go shell.Exec(ctlPath, append([]string{"dns", t.options.Name}, common.Map(dnsServer, netip.Addr.String)...)...).Run() } }