LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 11-14-2005, 08:12 AM   #1
zahadumy
Member
 
Registered: May 2005
Location: Cluj, Romania
Distribution: Fedora Core 6
Posts: 226

Rep: Reputation: 31
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.
 
Old 11-15-2005, 12:52 AM   #2
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 52
"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....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Max number of linux partition rupesh_pulikool Linux - General 2 01-22-2005 07:59 AM
max number of tty alaios Linux - Newbie 3 07-14-2004 12:23 AM
max socket number sector Programming 1 06-30-2003 09:11 AM
max socket number sector Linux - General 1 06-30-2003 09:09 AM
max socket number sector Linux - Software 0 06-30-2003 08:52 AM


All times are GMT -5. The time now is 09:46 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration