LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   I need to set a max number of processes for users (http://www.linuxquestions.org/questions/linux-software-2/i-need-to-set-a-max-number-of-processes-for-users-383009/)

zahadumy 11-14-2005 09:12 AM

I need to set a max number of processes for users
 
My problem is I need to do something in C and somewhere, somehow I go wrong... Basicly, I try to make some child processes with fork() and somehow, I can't figure out why, it creates a lot of child processes until the system freezes. It would be nice for me to set a max number of processes (like 100 or something) and fork() would return -1. I would like to do this both on Fedora Core 3 and Slackware 10.1, but I think you do it the same way on any distribution... Thank you.

perfect_circle 11-15-2005 01:52 AM

"You could set the limit in /etc/login.defs at ULIMIT value, something like 524288
(as it is in 512-byte units, 524288/512 = 1024 processes)"

for more info take a look at this thread:
http://www.linuxquestions.org/questi...hreadid=303185

Quote:

Basicly, I try to make some child processes with fork() and somehow, I can't figure out why, it creates a lot of child processes until the system freezes.
post some code. I'm pretty sure it's a programming error you are doing....


All times are GMT -5. The time now is 06:43 PM.