Skip to content

Commit 94e8652

Browse files
committed
remove redundant else
1 parent 664c581 commit 94e8652

File tree

4 files changed

+9
-30
lines changed

4 files changed

+9
-30
lines changed

src/os/exec_linux.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,16 @@ func forkExec(argv0 string, argv []string, attr *ProcAttr) (pid int, err error)
6262

6363
if err != nil {
6464
return 0, err
65-
} else {
66-
// else code runs in child, which then should exec the new process
67-
err = execve(argv0, argv, attr.Env)
68-
if err != nil {
69-
// exec failed
70-
return 0, err
71-
}
72-
// 3. TODO: use pipes to communicate back child status
73-
return pid, nil
7465
}
66+
67+
// else code runs in child, which then should exec the new process
68+
err = execve(argv0, argv, attr.Env)
69+
if err != nil {
70+
// exec failed
71+
return 0, err
72+
}
73+
// 3. TODO: use pipes to communicate back child status
74+
return pid, nil
7575
}
7676

7777
// In Golang, the idiomatic way to create a new process is to use the StartProcess function.

src/os/os.test

-1.88 MB
Binary file not shown.

src/os/osexec.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
//go:build linux && !baremetal && !tinygo.wasm
22

3-
// arm64 does not have a fork syscall, so ignore it for now
4-
// TODO: add support for arm64 with clone or use musl implementation
5-
63
package os
74

85
import (

src/os/osexec_aarch64.go

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)