6 #include "auto_spawn.h"
13 unsigned long hiddenlimit;
14 unsigned long maxnumd;
16 hiddenlimit = sizeof(fds) * 8;
17 maxnumd = (hiddenlimit - 5) / 2;
20 substdio_puts(subfderr,"Oops. You have set conf-spawn lower than 1.\n");
21 substdio_flush(subfderr);
25 if (auto_spawn > 255) {
26 substdio_puts(subfderr,"Oops. You have set conf-spawn higher than 255.\n");
27 substdio_flush(subfderr);
31 if (auto_spawn > maxnumd) {
32 substdio_puts(subfderr,"Oops. Your system's FD_SET() has a hidden limit of ");
33 substdio_put(subfderr,num,fmt_ulong(num,hiddenlimit));
34 substdio_puts(subfderr," descriptors.\n\
35 This means that the qmail daemons could crash if you set the run-time\n\
36 concurrency higher than ");
37 substdio_put(subfderr,num,fmt_ulong(num,maxnumd));
38 substdio_puts(subfderr,". So I'm going to insist that the concurrency\n\
39 limit in conf-spawn be at most ");
40 substdio_put(subfderr,num,fmt_ulong(num,maxnumd));
41 substdio_puts(subfderr,". Right now it's ");
42 substdio_put(subfderr,num,fmt_ulong(num,(unsigned long) auto_spawn));
43 substdio_puts(subfderr,".\n");
44 substdio_flush(subfderr);