On Fri, 14 Apr 2006, Jacob Yocom-Piatt wrote:
> since i've started doing C programming on my openbsd-3.8 release machine, i've
> had a problem with running processes. sometimes i get the following message
> when
> trying to issue shell commands:
>
> ksh: cannot fork - try again
>
> looking at my ulimit output, i see the following:
>
> $ ulimit -a
> time(cpu-seconds) unlimited
> file(blocks) unlimited
> coredump(blocks) unlimited
> data(kbytes) 524288
> stack(kbytes) 4096
> lockedmem(kbytes) 316622
> memory(kbytes) 945236
> nofiles(descriptors) 128
> processes 128
>
> should i change my login class settings in /etc/login.conf, or is sufficient
> to
> change them with "$ ulimit -n 128", etc.? i'm not sure what's going on here,
> so
> any advice is appreciated.
>
> this is my desktop machine and i have a lot of stuff open concurrently on it.
First check if your programming efforts aren't generating lots of
runaway processes. If that's not the case, login.conf is the answer;
ulimit one works for the current shell and processes forked by the
current shell. BTW, ulimit -n is for file descriptors, not procceses.
-Otto