Skip to content

Commit

Permalink
Add some comments, fix wrong error message
Browse files Browse the repository at this point in the history
  • Loading branch information
winks committed Aug 10, 2017
1 parent 1bb7081 commit b7c0063
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ all: build
build:
GOPATH=$(GOPATH) $(GO) build -ldflags "-X main.version=`cat VERSION`"

clean:
-rm time_wrapper

fmt:
GOPATH=$(GOPATH) find . -name "*.go" | xargs gofmt -w -s

Expand Down
7 changes: 6 additions & 1 deletion time_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,14 @@ func main() {
env := os.Environ()

// execute, incl. stdout, stderr and exit code \o/
// > Exec invokes the execve(2) system call.
// this is why we leave tail alone and don't shift the first element
// > execve() does not return on success, and the text, data, bss,
// > and stack of the calling process are overwritten by that of
// > the program loaded.
execErr := syscall.Exec(binary, tail, env)
if execErr != nil {
fmt.Println(lookErr)
fmt.Println(execErr)
os.Exit(2)
}
}

0 comments on commit b7c0063

Please sign in to comment.