summaryrefslogtreecommitdiff
path: root/src/chkspawn.c
diff options
context:
space:
mode:
authorJannis Hoffmann <jannis@fehcom.de>2024-07-03 15:52:39 +0200
committerJannis Hoffmann <jannis@fehcom.de>2024-07-03 15:52:39 +0200
commita6a7d6ce079cabdaf2fa502b2e2cf15e5428ac6f (patch)
treeb88cc7a8457658d67e0321718556ac807f6bccf3 /src/chkspawn.c
parent00be7622c428f279872f84569f098ce16150f8a8 (diff)
format files
Diffstat (limited to 'src/chkspawn.c')
-rw-r--r--src/chkspawn.c35
1 files changed, 20 insertions, 15 deletions
diff --git a/src/chkspawn.c b/src/chkspawn.c
index 511489a..2023a9e 100644
--- a/src/chkspawn.c
+++ b/src/chkspawn.c
@@ -1,9 +1,10 @@
#include "buffer.h"
+#include "exit.h"
#include "fmt.h"
#include "select.h"
-#include "exit.h"
+
#include "auto_spawn.h"
-#define MAXSPAWN 1000 /* Silent spawn limit increased to 1000 */
+#define MAXSPAWN 1000 /* Silent spawn limit increased to 1000 */
char num[FMT_ULONG];
fd_set fds;
@@ -12,35 +13,39 @@ int main()
{
unsigned long hiddenlimit;
unsigned long maxnumd;
-
+
hiddenlimit = sizeof(fds) * 8;
maxnumd = (hiddenlimit - 5) / 2;
-
+
if (auto_spawn < 1) {
- buffer_puts(buffer_2,"Oops. You have set conf-spawn lower than 1.\n");
+ buffer_puts(buffer_2, "Oops. You have set conf-spawn lower than 1.\n");
buffer_flush(buffer_2);
_exit(1);
}
if (auto_spawn > MAXSPAWN) {
- buffer_puts(buffer_2,"Oops. You have set conf-spawn higher than MAXSPAWN.\n");
+ buffer_puts(buffer_2, "Oops. You have set conf-spawn higher than MAXSPAWN.\n");
buffer_flush(buffer_2);
_exit(1);
}
if (auto_spawn > maxnumd) {
- buffer_puts(buffer_2,"Oops. Your system's FD_SET() has a hidden limit of ");
- buffer_put(buffer_2,num,fmt_ulong(num,hiddenlimit));
- buffer_puts(buffer_2," descriptors.\n\
+ buffer_puts(buffer_2, "Oops. Your system's FD_SET() has a hidden limit of ");
+ buffer_put(buffer_2, num, fmt_ulong(num, hiddenlimit));
+ buffer_puts(
+ buffer_2,
+ " descriptors.\n\
This means that the qmail daemons could crash if you set the run-time\n\
concurrency higher than ");
- buffer_put(buffer_2,num,fmt_ulong(num,maxnumd));
- buffer_puts(buffer_2,". So I'm going to insist that the concurrency\n\
+ buffer_put(buffer_2, num, fmt_ulong(num, maxnumd));
+ buffer_puts(
+ buffer_2,
+ ". So I'm going to insist that the concurrency\n\
limit in conf-spawn be at most ");
- buffer_put(buffer_2,num,fmt_ulong(num,maxnumd));
- buffer_puts(buffer_2,". Right now it's ");
- buffer_put(buffer_2,num,fmt_ulong(num,(unsigned long) auto_spawn));
- buffer_puts(buffer_2,".\n");
+ buffer_put(buffer_2, num, fmt_ulong(num, maxnumd));
+ buffer_puts(buffer_2, ". Right now it's ");
+ buffer_put(buffer_2, num, fmt_ulong(num, (unsigned long)auto_spawn));
+ buffer_puts(buffer_2, ".\n");
buffer_flush(buffer_2);
_exit(1);
}