aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/ipc
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/ipc')
-rw-r--r--pkg/ipc/ipc_simple.go23
1 files changed, 10 insertions, 13 deletions
diff --git a/pkg/ipc/ipc_simple.go b/pkg/ipc/ipc_simple.go
index 1aa9c07a5..4c2ac6925 100644
--- a/pkg/ipc/ipc_simple.go
+++ b/pkg/ipc/ipc_simple.go
@@ -13,7 +13,6 @@ import (
"os"
"os/exec"
"path/filepath"
- "runtime"
"strings"
"sync/atomic"
"time"
@@ -43,18 +42,16 @@ func MakeEnv(bin string, pid int, config Config) (*Env, error) {
if len(env.bin) == 0 {
return nil, fmt.Errorf("binary is empty string")
}
- if runtime.GOOS != "fuchsia" {
- env.bin[0] = osutil.Abs(env.bin[0])
- base := filepath.Base(env.bin[0])
- pidStr := fmt.Sprint(pid)
- if len(base)+len(pidStr) >= 16 {
- // TASK_COMM_LEN is currently set to 16
- base = base[:15-len(pidStr)]
- }
- binCopy := filepath.Join(filepath.Dir(env.bin[0]), base+pidStr)
- if err := os.Link(env.bin[0], binCopy); err == nil {
- env.bin[0] = binCopy
- }
+ env.bin[0] = osutil.Abs(env.bin[0])
+ base := filepath.Base(env.bin[0])
+ pidStr := fmt.Sprint(pid)
+ if len(base)+len(pidStr) >= 16 {
+ // TASK_COMM_LEN is currently set to 16
+ base = base[:15-len(pidStr)]
+ }
+ binCopy := filepath.Join(filepath.Dir(env.bin[0]), base+pidStr)
+ if err := os.Link(env.bin[0], binCopy); err == nil {
+ env.bin[0] = binCopy
}
return env, nil
}