Stephen Hahn wrote: > * Roland Mainz <[EMAIL PROTECTED]> [2007-02-20 17:15]: > > [EMAIL PROTECTED] wrote: > > > > > > >Is there an API which can be used to limit the number of threads/LWPs > > > >per process/process group (e.g. similar to "ulimit" (e.g. not > > > >per-project)) ? Some platforms define |RLIMIT_PTHREAD| for this purpose > > > >but I can't find something similar for Solaris (it would be usefull to > > > >get ksh93's ulimit "-T" option implemented) ... ;-( > > > > > > It's a resource control in Solaris. > > > > Ok... would you be interested to sponsor a patch to get the following > > RLIMIT_* flags implemented (e.g. some platforms support these controls > > for setrlimit(2)/getrlimit(2)): > > -- snip -- > > RLIMIT_LOCKS > > RLIMIT_MEMLOCK > > RLIMIT_PTHREAD > > -- snip -- > > These are currently the only ones listed as "not supported" by ksh93's > > "ulimit" builtin: > > -- snip -- [snip] > > -- snip -- > > I would really rather not see the setrlimit(2) emulation in the > resource control framework extended.
Why ? > Perhaps an OpenSolaris-specific > function in ksh93 to call setrctl(2) directly would be more > appropriate. (Plus we don't have process-level controls for some of > these resources today.) There are two problems: 1. "ulimit" works per-process and these controls should IMO be available per-process. 2. setrctl(2) is currently a non-standard API I really like to see at least RLIMIT_PTHREAD implemented to have a limit which prevents applications from running a threaded version of the fork()-bomb. ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) [EMAIL PROTECTED] \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 7950090 (;O/ \/ \O;) _______________________________________________ opensolaris-code mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
