Date: Fri, 27 Dec 1996 11:12:30 -0800 (PST) From: Gary Kline <kline@tera.com> To: softweyr@xmission.com (Softweyr LLC) Cc: kline@tera.com, questions@freebsd.org Subject: Re: multi-media app runs out of forking capabilities Message-ID: <199612271912.LAA11283@athena.tera.com> In-Reply-To: <199612271607.JAA19151@xmission.xmission.com> from Softweyr LLC at "Dec 27, 96 09:07:32 am"
next in thread | previous in thread | raw e-mail | index | archive | help
According to Softweyr LLC: > On Thu, 26 Dec 1996, Gary Kline wrote: > [[ ... ]] > > > > Is there a way that one program can send a flag > > to another program? Assuming yes, where is some > > sample code?? > > Sure. Signals are a simple, but error prone way. A UNIX-domain socket > or a FIFO would work well, or even a MSGQ. You can find instructions > on using most (or maybe all) of these in W. Richard Stevens' excellent > books _UNIX Network Programming_ (0-13-949876-1) and _Advanced > Programming in the UNIX Environment_ (0-201-56317-7), both from > Prentice Hall. I've already tried a FIFO; close, but no cigar. Looks like spawning a new proc is the bbest way. I have an older version of Stevens' networking text. Probably ought to check out the _Advanced_ book. Do you know when it was published, off-hand? Anyway, thanks for the pointers. > > Your 'can't fork' messages may be caused by the per-process limits on > child processes. Are you gathering the status of your child processes > with wait(2) at any point? If not, all of your child processes will > remain counted against your per-process limit until you wait() for them. > Richards UNIX book will explain the UNIX process model and the relation- > ship between parent and child processes better than I can here. ;^) > This is most probably it. I can't do a wait because the program I'm forking infinite-loops until I change state. The wait() would wait infinitely. Hmm. There's got to be other ways of doing this.... Tx again, gary
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199612271912.LAA11283>