Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!wuarchive!uunet!seismo!dimacs.rutgers.edu!rutgers!njin!uupsi!cci632!twb From: twb@cci632.cci.com (Tom Banister) Newsgroups: comp.unix.wizards Subject: Max process count Keywords: fork MAXUPRC Message-ID: <1991May20.175125.5764@cci632.cci.com> Date: 20 May 91 17:51:25 GMT Distribution: usa Organization: Computer Consoles Incorporated Lines: 25 One of the ways fork() can fail is : "The system-imposed limit on the total number of processes under execution by a single user would be exceeded." I have several questions about that. 1) Does that mean all processes with the same effective user id would be counted, or all processes from a single login? I tend to believe it's all processes with the same effective user id. 2) Is there some way that I can determine; from a user program, how many processes are running with the same effective user id? 3) How can I determine from a user program what the maximum number of processes is? On the Sun's here has a MAXUPRC, but that #define does not exist on the SysV machines here. Besides, I'd like to know the maximum at run time, not the last time the kernel was compiled. Yes, I know that I could fork() until EAGAIN is returned and count the fork()'s, but that's pretty shoddy. Thanks in advance for all useful responses. -- Thomas W. Banister twb@cci.com Analysts International Corp. {rit,uupsi}!cci632!twb 205 Saint Paul Street Rochester, New York 716-325-6640