Fix: handle negative (unlimited) system stack size limits
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 6 Jul 2016 04:14:26 +0000 (00:14 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 6 Jul 2016 04:15:04 +0000 (00:15 -0400)
commit4d5fb75f02db3ea42a5d9718f2c34dda4c485f76
tree8694f19ef368a51de9d29ff3e32bbc4476a0cd96
parent4881bba88a421d8e7f41d58feb88b4ca459af87d
Fix: handle negative (unlimited) system stack size limits

This also changes the stack size selection policy to select
the largest of:

1) default pthread stack size (dictated by libc)
2) system soft limit
3) 2 MB

This is bounded by the system's hard limit on stack size.
If this limit is smaller than 2 MB, the default size mentionned
in pthread_create(3) for Linux, we warn the user that the daemons
may be unreliable and advise bumping this limit.

Note that is is most likely possible to operate the daemons with
way less than 2MB of stack space. However, this was not
extensively tested.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/defaults.c
src/common/defaults.h
This page took 0.026651 seconds and 5 git commands to generate.