Commit 28eff63e authored by Matt Layher's avatar Matt Layher
Browse files

pkg/runtime: use panic instead of log.Fatal for system call errors


Signed-off-by: default avatarMatt Layher <mdlayher@gmail.com>
parent 45c8b084
......@@ -17,7 +17,6 @@ package runtime
import (
"fmt"
"log"
"syscall"
)
......@@ -37,7 +36,7 @@ func getLimits(resource int, unit string) string {
rlimit := syscall.Rlimit{}
err := syscall.Getrlimit(resource, &rlimit)
if err != nil {
log.Fatal("Error!")
panic("syscall.Getrlimit failed: " + err.Error())
}
return fmt.Sprintf("(soft=%s, hard=%s)", limitToString(uint64(rlimit.Cur), unit), limitToString(uint64(rlimit.Max), unit))
}
......
......@@ -14,7 +14,6 @@
package runtime
import (
"log"
"syscall"
)
......@@ -23,7 +22,7 @@ func Uname() string {
buf := syscall.Utsname{}
err := syscall.Uname(&buf)
if err != nil {
log.Fatal("Error!")
panic("syscall.Uname failed: " + err.Error())
}
str := "(" + charsToString(buf.Sysname[:])
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment