aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/resourceLimit.hs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/resourceLimit.hs')
-rw-r--r--tests/resourceLimit.hs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/resourceLimit.hs b/tests/resourceLimit.hs
new file mode 100644
index 0000000..05e35af
--- /dev/null
+++ b/tests/resourceLimit.hs
@@ -0,0 +1,16 @@
+
+-- #2038
+
+import System.Posix.Resource
+
+main :: IO ()
+main = do
+ let soft = ResourceLimit 5
+ hard = ResourceLimit 10
+ setResourceLimit ResourceCPUTime (ResourceLimits soft hard)
+ r <- getResourceLimit ResourceCPUTime
+ let (ResourceLimit s) = softLimit r
+ let (ResourceLimit h) = hardLimit r
+ putStrLn $ show s
+ putStrLn $ show h
+