projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9670d06
)
threads: don't do rlimit test when running as root
author
Ryan Lortie
<desrt@desrt.ca>
Thu, 21 Feb 2013 10:19:27 +0000
(10:19 +0000)
committer
Ryan Lortie
<desrt@desrt.ca>
Thu, 21 Feb 2013 10:19:27 +0000
(10:19 +0000)
Linux CAP_SYS_RESOURCE overrides RLIMIT_NPROC so we probably shouldn't
test thread creation failure when running the test as root...
glib/tests/thread.c
patch
|
blob
|
history
diff --git
a/glib/tests/thread.c
b/glib/tests/thread.c
index
f91fcae
..
539782e
100644
(file)
--- a/
glib/tests/thread.c
+++ b/
glib/tests/thread.c
@@
-136,6
+136,12
@@
test_thread4 (void)
GError *error;
gint ret;
+ /* Linux CAP_SYS_RESOURCE overrides RLIMIT_NPROC, and probably similar
+ * things are true on other systems.
+ */
+ if (getuid () == 0 || geteuid () == 0)
+ return;
+
getrlimit (RLIMIT_NPROC, &nl);
nl.rlim_cur = 1;