1BUFFCHAN(8)                 System Manager's Manual                BUFFCHAN(8)
2
3
4

NAME

6       buffchan - buffered file-writing backend for InterNetNews
7

SYNOPSIS

9       buffchan  [  -b  ]  [  -c  lines ] [ -C seconds ] [ -d directory ] [ -f
10       num_fields ] [ -m map ] [ -p pidfile ] [ -l lines ] [ -L seconds ] [ -r
11       ] [ -s filename_format ] [ -u ]
12

DESCRIPTION

14       Buffchan  reads  lines from standard input and copies certain fields in
15       each line into files named by other fields within the  line.   Buffchan
16       is intended to be called by innd(8) as an exploder feed.
17

OPTIONS

19       -b     Once  buffchan  opens  a  file it keeps it open.  The input must
20              therefore never specify more files than the number of  available
21              descriptors can keep open.  If the ``-b'' flag is used, the pro‐
22              gram will allocate a buffer and attach it to the file using set‐
23              buf(3).
24
25       -c lines
26              If  the ``-c'' flag is used, buffchan will close, and re-open, a
27              file after every lines lines are written to a file.
28
29       -C seconds
30              Similarly, the ``-C'' flag may be used to specify that all files
31              should be closed and re-opened every seconds seconds.
32
33       -d directory
34              The  ``-d''  flag may be used to specify a directory the program
35              should change to before starting.  If this flag  is  used,  then
36              the  default  for  the  ``-s''  flag  is  changed to be a simple
37              ``%s''.
38
39       -f num_fields
40              Buffchan input is interpreted as a sequence of lines.  Each line
41              contains  a  fixed number of initial fields, followed by a vari‐
42              able number of filename fields.  All fields in a line are  sepa‐
43              rated  by  whitespace.   The default number of initial fields is
44              one; the ``-f'' flag may be used to specify a  different  number
45              of fields.
46
47       -m map Map  files  specify short names as aliases for domain names; see
48              filechan(8) for details and an example.
49
50       -p pidfile
51              If the ``-p'' flag is used, the program will write a  line  con‐
52              taining its process ID (in text) to the specified file.
53
54       -l lines
55              If  the  ``-l'' flag is used, buffchan will call fflush(3) after
56              every lines lines are written to a file.
57
58       -L seconds
59              If the ``-L'' flag is used, all files will be  flushed  every  n
60              seconds.
61
62       -r     By   default,   the   program   sends   its  error  messages  to
63              <pathlog in inn.conf>/errlog.  To suppress this redirection  and
64              send error messages to standard error, use the ``-r'' flag.
65
66       -s filename_format
67              After  the  initial fields, each remaining field names a file to
68              write.  The ``-s'' flag may be used to specify a  format  string
69              that maps the field to a file name.  This is a sprintf(3) format
70              string which should have a single ``%s'' parameter which will be
71              given the contents of a non-initial field.  The default value is
72              <pathoutgoing in inn.conf>/%s.  See the description of this flag
73              in filechan(8).
74
75       -u     If  the ``-u'' flag is used, the program will request unbuffered
76              output.
77
78       Buffchan can be invoked as an exploder  feed  (see  newsfeeds(5)).   As
79       such,  if a line starts with an exclamation point it will be treated as
80       a command.  There are three commands, described below:
81
82       flush  The ``flush''  command  closes  and  re-opens  all  open  files;
83              ``flush xxx''  which flushes only the specified site.  These are
84              analogous to  the  ctlinnd(8)  ``flush''  command,  and  can  be
85              achieved  by doing a ``send "flush xxx"'' command.  Applications
86              can tell that the ``flush'' has completed by renaming  the  file
87              before  issuing  the command; buffchan has completed the command
88              when the original filename re-appears.   If  <$ac_cv_func_fchmod
89              in  config.cache>  is  ``yes'',  then  buffchan also changes the
90              access permissions of the file from read-only  for  everyone  to
91              read-write for owner and group as it flushes or closes each out‐
92              put file.  It will change the modes back to read-only if it  re-
93              opens the same file.
94
95       drop   The  ``drop'' command is similar to the ``flush'' command except
96              that no files are re-opened.  If given  an  argument,  then  the
97              specified  site  is  dropped,  otherwise  all sites are dropped.
98              (Note that the site will be restarted if the input  stream  men‐
99              tions  the site.)  When a ctlinnd ``drop site'' command is sent,
100              innd will automatically forward  the  command  to  buffchan  for
101              sites listed as funnels feeding into this exploder.  To drop all
102              sites, use the ctlinnd ``send buffchan-site drop'' command.
103
104       readmap
105              The map file (specified with the ``-m'' flag) is reloaded.
106

HISTORY

108       Written by Rich $alz <rsalz@uunet.uu.net> for  InterNetNews.   This  is
109       revision 5909, dated 2002-12-03.
110

SEE ALSO

112       ctlinnd(8), filechan(8), inn.conf(5), innd(8), newsfeeds(5).
113
114
115
116                                                                   BUFFCHAN(8)
Impressum