Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
Fix compilation error in pid.go
Browse files Browse the repository at this point in the history
  • Loading branch information
fourcube committed Oct 11, 2018
1 parent b5cc5f3 commit 0fdba37
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pid.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func CreatePidfile(pidFile string) {
defer f.Close()

if pidBytes, err := ioutil.ReadAll(f); err != nil {
log.Fatalf("Failed to read from pidfile %v")
log.Fatalf("Failed to read from pidfile %v", err)
} else {
if len(pidBytes) == 0 {
goto foo
Expand All @@ -52,10 +52,10 @@ func CreatePidfile(pidFile string) {

foo:
if err = f.Truncate(0); err != nil {
log.Fatalf("Failed to truncate pidfile", err)
log.Fatalf("Failed to truncate pidfile %v", err)
}
if _, err = f.Seek(0, 0); err != nil {
log.Fatalf("Failed to seek pidfile", err)
log.Fatalf("Failed to seek pidfile %v", err)
}

_, err = fmt.Fprintf(f, "%d", os.Getpid())
Expand Down

0 comments on commit 0fdba37

Please sign in to comment.