diff -ru bin/sh.orig/miscbltin.c bin/sh/miscbltin.c --- bin/sh.orig/miscbltin.c 2004-04-22 13:52:53.000000000 -0300 +++ bin/sh/miscbltin.c 2004-09-12 16:36:56.000000000 -0300 @@ -348,6 +348,9 @@ #ifdef RLIMIT_POSIXLOCK { "posixlocks", (char *)0, RLIMIT_POSIXLOCK, 1, 'k' }, #endif +#ifdef RLIMIT_FORK + { "fork depth", (char *)0, RLIMIT_FORK, 1, 'r' }, +#endif { (char *) 0, (char *)0, 0, 0, '\0' } }; @@ -364,7 +367,7 @@ struct rlimit limit; what = 'f'; - while ((optc = nextopt("HSatfdsmcnuvlbk")) != '\0') + while ((optc = nextopt("HSatfdsmcnuvlbkr")) != '\0') switch (optc) { case 'H': how = HARD; diff -ru bin/sh.orig/sh.1 bin/sh/sh.1 --- bin/sh.orig/sh.1 2003-06-17 01:22:50.000000000 -0300 +++ bin/sh/sh.1 2004-09-12 16:37:38.000000000 -0300 @@ -1819,7 +1819,7 @@ For aliases the alias expansion is printed; for commands and tracked aliases the complete pathname of the command is printed. -.It Ic ulimit Oo Fl HSabcdflmnstuv Oc Op Ar limit +.It Ic ulimit Oo Fl HSabcdflmnrstuv Oc Op Ar limit Set or display resource limits (see .Xr getrlimit 2 ) . If @@ -1872,6 +1872,8 @@ The maximal resident set size of a process, in kilobytes. .It Fl n Ar nofiles The maximal number of descriptors that could be opened by a process. +.It Fl r Ar forkdepth +The maximal depth of the process tree having the current process as its root. .It Fl s Ar stacksize The maximal size of the stack segment, in kilobytes. .It Fl t Ar time