Skip to content

Commit

Permalink
remove redundant else
Browse files Browse the repository at this point in the history
  • Loading branch information
leongross committed Nov 3, 2024
1 parent 664c581 commit 40487c7
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/os/exec_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,16 @@ func forkExec(argv0 string, argv []string, attr *ProcAttr) (pid int, err error)

if err != nil {
return 0, err
} else {
// else code runs in child, which then should exec the new process
err = execve(argv0, argv, attr.Env)
if err != nil {
// exec failed
return 0, err
}
// 3. TODO: use pipes to communicate back child status
return pid, nil
}

// else code runs in child, which then should exec the new process
err = execve(argv0, argv, attr.Env)
if err != nil {
// exec failed
return 0, err
}
// 3. TODO: use pipes to communicate back child status
return pid, nil
}

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

0 comments on commit 40487c7

Please sign in to comment.