From: Ian Lynagh Date: Fri, 10 Jul 2009 20:42:21 +0000 (+0000) Subject: Use throwErrnoIfMinus1_ when calling getrusage X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=004b338d7745211d49ea9fd60b42d13d342be49b;p=ghc-base.git Use throwErrnoIfMinus1_ when calling getrusage --- diff --git a/System/CPUTime.hsc b/System/CPUTime.hsc index cb23d93..2dbc896 100644 --- a/System/CPUTime.hsc +++ b/System/CPUTime.hsc @@ -91,7 +91,7 @@ getCPUTime = do -- #if defined(HAVE_GETRUSAGE) && ! irix_HOST_OS && ! solaris2_HOST_OS allocaBytes (#const sizeof(struct rusage)) $ \ p_rusage -> do - getrusage (#const RUSAGE_SELF) p_rusage + throwErrnoIfMinus1_ "getrusage" $ getrusage (#const RUSAGE_SELF) p_rusage let ru_utime = (#ptr struct rusage, ru_utime) p_rusage let ru_stime = (#ptr struct rusage, ru_stime) p_rusage