home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
300-399
/
ff319.lzh
/
CNewsSrc
/
cnews.src.lzh
/
input
/
Flow.Diag
< prev
next >
Wrap
Text File
|
1980-01-01
|
3KB
|
57 lines
Step 1:
UUCICO accepts files from the news feed and places them in the
/usr/spool/uucp (SPOOLDIR) directory.
Step 2:
When UUCICO is done, it fires up UUXQT before terminating. UUXQT
reads the SPOOLDIR directory looking for files beginning with "X."
These are files that need to be executed. A news batch will have
"rnews" on the line starting with a 'C' (the command line). The
source file name is on the 'I' line (the input file). That file
is opened for input by the UUXQT daemon and given to RNEWS as stdin.
Step 3:
The RNEWS program (the rnews.batch script in this directory) calls
the C program NEWSSPOOL (the newsspool.c file in this directory)
which removes the "#! cunbatch" or "#! c7unbatch" header from the
beginning of stdin (or the files given on the command line, if there
are any [that allows manually controlled unbatching]). The NEWSSPOOL
program also moves the file into the "in.coming" directory. There is
an option for immediately executing NEWSRUN (shell script) below.
Normally, though, this program terminates and NEWSRUN is executed
via CRON.
Step 4:
First, NEWSRUN attempts to create a lock to indicate that someone
is trying to do the unbatching of incoming news... It performs
an "exit 0" if there is already a lock in place.
Step 5:
NEWSRUN goes through the $NEWSART/in.coming directory looking for
files (50 at a time). It attempts to run COMPRESS -D to decompress
the file (note that this requires slightly more free space since the
compressed and uncompressed versions must both exist at the same
time for a period of time). If COMPRESS doesn't terminate successfully
(such as the file isn't compressed or must be run through c7decode
first) then the input file is run through C7DECODE | COMPRESS -D.
And if that doesn't work either, then the news must be straight text.
Note that in both of the uncompression attempts, the input and output
files are selected by I/O redirection.
Step 6:
When a text file is finally obtained, that file is redirected into
RELAYNEWS -R -N. The "-r" is for redirecting std{out,err} into log
files, and the "-n" specifies to create history entries for those
articles that are rejected (not too expensive unless much of what is
received is rejected).
If the RELAYNEWS is not successful (non-zero exit status) then a mail
message is sent to $NEWSMASTER to inform him/her of the problem.
Step 7:
Finally, after each iteration through the loop for processing compressed
files, the old compressed files (and any text files) are removed.
[Perhaps the compressed file should be removed earlier to save disk
space. After all, there's no attempt to keep it for later debugging
with RELAYNEWS when there's an unbatching error...]