Index: ossp-pkg/lmtp2nntp/lmtp2nntp.c RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/lmtp2nntp.c,v rcsdiff -q -kk '-r1.87' '-r1.88' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/lmtp2nntp.c,v' 2>/dev/null --- lmtp2nntp.c 2001/10/12 12:03:19 1.87 +++ lmtp2nntp.c 2001/10/12 12:26:26 1.88 @@ -157,7 +157,7 @@ int option_daemon; int option_aclc; struct acl option_acl[MAXACLS]; - int option_maxchilds; + int option_childsmax; int active_childs; l2_stream_t *l2; sa_addr_t *saaAltio; @@ -207,11 +207,12 @@ */ fprintf(stderr, "USAGE: %s " + "[-C childsmax] " "[-D] " "[-K] " "[-P pidfile] " "[-a addr/mask[,addr/mask[,...]] " - "[-b addr[:port]|-|path] " + "[-b addr[:port]|-|path[:perms]] " "[-c addr[:port]] " "[-d addr[:port][,addr[:port], ...]] " "[-g groupmode] " @@ -438,7 +439,7 @@ ctx->option_killflag = FALSE; ctx->option_uid = getuid(); ctx->option_daemon = FALSE; - ctx->option_maxchilds = 10; + ctx->option_childsmax = 10; ctx->active_childs = 0; ctx->l2 = NULL; ctx->saaAltio = NULL; @@ -483,10 +484,10 @@ /* read in the arguments */ while ((i = getopt(argc, argv, "C:DKP:a:b:c:d:g:l:m:n:o:s:t:u:v")) != -1) { switch (i) { - case 'C': /*POD [B<-C> I] */ - ctx->option_maxchilds = atoi(optarg); - if (ctx->option_maxchilds <= 0) { - fprintf(stderr, "%s:Error: Invalid number of maximum children (%d) to option -C\n", ctx->progname, ctx->option_maxchilds); + case 'C': /*POD [B<-C> I] */ + ctx->option_childsmax = atoi(optarg); + if (ctx->option_childsmax <= 0) { + fprintf(stderr, "%s:Error: Invalid number (%d) to option -C\n", ctx->progname, ctx->option_childsmax); CU(ERR_EXECUTION); } break; @@ -535,7 +536,7 @@ } free(azACL); break; - case 'b': /*POD [B<-b> I[I<:port>]|C<->|I] */ + case 'b': /*POD [B<-b> I[I<:port>]|C<->|I[:perms]] */ if (strcmp(optarg, "-") != 0) { if ((rc = sa_create(&ctx->saAltio)) != SA_OK) { fprintf(stderr, "%s:Error: Creating TCP socket failed for \"%s\": %s\n", @@ -1081,8 +1082,8 @@ sa_timeout(ctx->saAltio, SA_TIMEOUT_READ, ctx->option_timeout_lmtp_read, 0); sa_timeout(ctx->saAltio, SA_TIMEOUT_WRITE, ctx->option_timeout_lmtp_write, 0); while (1) { - while (ctx->active_childs >= ctx->option_maxchilds) { - log1(ctx, ERROR, "maximum number of childs (%d) reached - waiting (1s)", ctx->option_maxchilds); + while (ctx->active_childs >= ctx->option_childsmax) { + log1(ctx, ERROR, "maximum number of childs (%d) reached - waiting (1s)", ctx->option_childsmax); sleep(1); } Index: ossp-pkg/lmtp2nntp/lmtp2nntp.pod RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/lmtp2nntp.pod,v rcsdiff -q -kk '-r1.29' '-r1.30' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/lmtp2nntp.pod,v' 2>/dev/null --- lmtp2nntp.pod 2001/10/12 08:57:51 1.29 +++ lmtp2nntp.pod 2001/10/12 12:26:26 1.30 @@ -33,11 +33,12 @@ =head1 SYNOPSIS B +[B<-C> I] [B<-D>] [B<-K>] [B<-P> I] [B<-a> I/I[,I/I[,...]] -[B<-b> I[I<:port>]|C<->|I] +[B<-b> I[I<:port>]|C<->|I[:perms]] [B<-c> I[I<:port>]] [B<-d> I[I<:port>][,I[I<:port>], ...]] [B<-g> I] @@ -68,6 +69,10 @@ =over 4 +=item B<-C> I + +Childs the daemon spawns at maximum. Default is 10. + =item B<-D> Daemonize program and detach from current terminal. @@ -98,12 +103,13 @@ specify any inclusions a fake inclusion of 0.0.0.0/0 is appended internally. Any addr can be a name to be resolved first. -=item B<-b> I[I<:port>]|C<->|I (LMTP daemon bind) +=item B<-b> I[I<:port>]|C<->|I (LMTP daemon bind) Bind address accepting incoming LMTP connections. Supported are "C<->" for -stdio, I for Unix Domain socket and I[I<:port>] for TCP INET -socket. Omitting this option defaults to stdio. The path for a UNIX domain -socket must start with a slash. The addr can be a name to be resolved first. +stdio, I[:perms] for Unix Domain socket with optional chmod-like +permissions and I[I<:port>] for TCP INET socket. Omitting this option +defaults to stdio. The path for a UNIX domain socket must start with a slash. +The addr can be a name to be resolved first. =item B<-c> I[I<:port>] (NNTP client bind)