$BUILTIN ulimit
$FUNCTION ulimit_builtin
$DEPENDS_ON !_MINIX
-$SHORT_DOC ulimit [-SHacdefilmnpqrstuvx] [limit]
+$SHORT_DOC ulimit [-SHabcdefilmnpqrstuvxT] [limit]
Modify shell resource limits.
Provides control over the resources available to the shell and processes
-u the maximum number of user processes
-v the size of virtual memory
-x the maximum number of file locks
+ -T the maximum number of threads
+
+Not all options are available on all platforms.
If LIMIT is given, it is the new value of the specified resource; the
special LIMIT values `soft', `hard', and `unlimited' stand for the
#include <config.h>
#include "../bashtypes.h"
-#ifndef _MINIX
+#if defined (HAVE_SYS_PARAM_H)
# include <sys/param.h>
#endif
# define RLIMIT_MAXUPROC 260
#endif
+#if !defined (RLIMIT_PTHREAD) && defined (RLIMIT_NTHR)
+# define RLIMIT_PTHREAD RLIMIT_NTHR
+#endif
+
#if !defined (RLIM_INFINITY)
# define RLIM_INFINITY 0x7fffffff
#endif