On Sat, 19 Oct 2002, Justin Mason wrote: > Also, if we can come up with a way to impl a -m-type system without > counting pids and using REAPER (ie the stuff that dumps core!), then we > should try that.
No patch, but a suggestion: Use file descriptors. Create a pipe() between the "master" spamd and each forked "worker" spamd. The worker closes the read end, the master closes the write end, and the worker writes a single byte to the pipe after it has processed the message. The master can use select() to keep track of how many of those pipes are active. The number writable is the number of workers; the number readable is the number of "unreaped" workers. When it detects a readble pipe, the master closes that descriptor (it doesn't even need to read the one byte), creates a new pipe, and forks a new worker. ------------------------------------------------------- This sf.net email is sponsored by: Access Your PC Securely with GoToMyPC. Try Free Now https://www.gotomypc.com/s/OSND/DD _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk