Skip to content

Commit 4161986

Browse files
authored
Missing command line option documentation
The clamd and clamav-milter `--help` message and manpages do not mention the `--pid` (`-p`) option. The clamd `--help` message and manpage do not mention the `--datadir` option. Also corrected minor punctuation issues, and removed the meaningless jargon about the "main thread" which has nothing to do with the PID.
1 parent e70493c commit 4161986

13 files changed

Lines changed: 25 additions & 14 deletions

clamav-milter/clamav-milter.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,10 @@ int main(int argc, char **argv)
126126
printf("\n");
127127
printf(" %s [-c <config-file>]\n\n", argv[0]);
128128
printf("\n");
129-
printf(" --help -h Show this help\n");
130-
printf(" --version -V Show version\n");
131-
printf(" --config-file <file> -c Read configuration from file\n");
129+
printf(" --help -h Show this help\n");
130+
printf(" --version -V Show version\n");
131+
printf(" --config-file <file> -c Read configuration from file\n");
132+
printf(" --pid=FILE -p FILE Write the daemon's pid to FILE\n");
132133
printf("\n");
133134
optfree(opts);
134135
return 0;

clamd/clamd.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ static void help(void)
106106
printf(" --debug Enable debug mode\n");
107107
printf(" --log=FILE -l FILE Log into FILE\n");
108108
printf(" --config-file=FILE -c FILE Read configuration from FILE\n");
109-
printf(" --fail-if-cvd-older-than=days Return with a nonzero error code if virus database outdated.\n");
109+
printf(" --fail-if-cvd-older-than=days Return with a nonzero error code if virus database outdated\n");
110+
printf(" --datadir=DIRECTORY Load signatures from DIRECTORY\n");
111+
printf(" --pid=FILE -p FILE Write the daemon's pid to FILE\n");
110112
printf("\n");
111113
printf("Pass in - as the filename for stdin.\n");
112114
printf("\n");

docs/man/clamav-milter.conf.5.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Chroot to the specified directory. Chrooting is performed just after reading the
7373
Default: unset (don\'t chroot)
7474
.TP
7575
\fBPidFile STRING\fR
76-
Save the process identifier of a clamav-milter (main thread) to a specified file.
76+
Write the daemon's pid to the specified file.
7777
.br
7878
Default: disabled
7979
.TP

docs/man/clamd.8.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ Read configuration from FILE.
115115
.TP
116116
\fB\-\-fail\-if\-cvd\-older\-than=days\fR
117117
Return with a nonzero error code if the virus database is older than the specified number of days.
118+
.TP
119+
\fB\-\-datadir=DIRECTORY\fR
120+
Load signatures from DIRECTORY.
121+
.TP
122+
\fB\-p FILE, \-\-pid=FILE\fR
123+
Write the daemon's pid to FILE.
118124

119125
.SH "ENVIRONMENT VARIABLES"
120126
.LP

docs/man/clamd.conf.5.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Log additional information about the infected file, such as its size and hash, t
8383
Default: no
8484
.TP
8585
\fBPidFile STRING\fR
86-
Save the process identifier of a listening daemon (main thread) to a specified file.
86+
Write the daemon's pid to the specified file.
8787
.br
8888
Default: disabled
8989
.TP

docs/man/freshclam.1.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Log report to FILE.
4646
Run in a daemon mode. Defaults to 12 checks per day unless otherwise specified by \-\-checks or freshclam.conf.
4747
.TP
4848
\fB\-p FILE, \-\-pid=FILE\fR
49-
Write daemon's pid to FILE.
49+
Write the daemon's pid to FILE.
5050
.TP
5151
\fB\-F, \-\-foreground\fR
5252
Don't fork into background (for use in daemon mode).

docs/man/freshclam.conf.5.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Rotate log file. Requires LogFileMaxSize option set prior to this option.
5757
Default: no
5858
.TP
5959
\fBPidFile STRING\fR
60-
This option allows you to save the process identifier of the daemon to a file specified in the argument.
60+
Write the daemon's pid to the specified file.
6161
.br
6262
Default: disabled
6363
.TP

etc/clamav-milter.conf.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Example
5858
#Chroot /newroot
5959

6060
# This option allows you to save a process identifier of the listening
61-
# daemon (main thread).
61+
# daemon.
6262
# This file will be owned by root, as long as clamav-milter was started by
6363
# root. It is recommended that the directory where this file is stored is
6464
# also owned by root to keep other users from tampering with it.

etc/clamd.conf.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Example
6969
#ExtendedDetectionInfo yes
7070

7171
# This option allows you to save a process identifier of the listening
72-
# daemon (main thread).
72+
# daemon.
7373
# This file will be owned by root, as long as clamd was started by root.
7474
# It is recommended that the directory where this file is stored is
7575
# also owned by root to keep other users from tampering with it.

etc/freshclam.conf.sample

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ Example
4646
# Default: no
4747
#LogRotate yes
4848

49-
# This option allows you to save the process identifier of the daemon
49+
# Write the daemon's pid to the specified file.
50+
# You must run freshclam with --daemon (-d) for freshclam to run as a daemon.
5051
# This file will be owned by root, as long as freshclam was started by root.
5152
# It is recommended that the directory where this file is stored is
5253
# also owned by root to keep other users from tampering with it.

0 commit comments

Comments
 (0)