@@ -298,12 +298,15 @@ (not (string-match "^\\s*" x))) val-list)) '()))) (define (commonmod:get-cpu-load) - (let* ((load-info (with-input-from-file "/proc/loadavg" read-lines))) - (map string->number (string-split (car load-info))))) + (let* ((load-info (with-input-from-file "/proc/loadavg" read-lines)) + (res (map string->number (string-split (car load-info))))) + (if (null? res) + #f ;; something is wrong + (car res)))) (define *current-host-cores* #f) (define (get-current-host-cores) (or *current-host-cores*